From 401004e5c4d17f0fe6173517ce430b4d63cd9277 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 17 Sep 2018 22:08:53 +0000 Subject: [PATCH] Generated from 99cc08656140c8ac796d837f62e563652d46f430 add degreeOfParallelism to preview API :wq --- .../azure/datalake/analytics/Catalogs.java | 2937 +++++++ ...aLakeAnalyticsCatalogManagementClient.java | 111 + .../DataLakeAnalyticsJobManagementClient.java | 111 + .../azure/datalake/analytics/Jobs.java | 445 + .../azure/datalake/analytics/Pipelines.java | 248 + .../azure/datalake/analytics/Recurrences.java | 248 + .../implementation/CatalogsImpl.java | 7185 +++++++++++++++++ ...eAnalyticsCatalogManagementClientImpl.java | 199 + ...aLakeAnalyticsJobManagementClientImpl.java | 199 + .../analytics/implementation/JobsImpl.java | 1025 +++ .../implementation/PipelinesImpl.java | 605 ++ .../implementation/RecurrencesImpl.java | 605 ++ .../implementation/package-info.java | 11 + .../azure/datalake/analytics/models/Acl.java | 68 + .../models/AclCreateOrUpdateParameters.java | 101 + .../analytics/models/AclDeleteParameters.java | 73 + .../datalake/analytics/models/AclType.java | 50 + .../analytics/models/BaseJobParameters.java | 70 + .../analytics/models/BuildJobParameters.java | 43 + .../analytics/models/CatalogItem.java | 70 + .../analytics/models/CatalogItemList.java | 69 + .../analytics/models/CompileMode.java | 56 + .../analytics/models/CreateJobParameters.java | 183 + .../analytics/models/CreateJobProperties.java | 78 + .../models/CreateScopeJobParameters.java | 46 + .../models/CreateScopeJobProperties.java | 76 + .../models/CreateUSqlJobProperties.java | 50 + ...ticsCatalogCredentialCreateParameters.java | 97 + ...ticsCatalogCredentialDeleteParameters.java | 44 + ...ticsCatalogCredentialUpdateParameters.java | 125 + ...CatalogSecretCreateOrUpdateParameters.java | 70 + .../datalake/analytics/models/DdlName.java | 121 + .../analytics/models/Diagnostics.java | 108 + .../datalake/analytics/models/EntityId.java | 71 + .../analytics/models/ExternalTable.java | 69 + .../datalake/analytics/models/FileType.java | 53 + .../analytics/models/HiveJobProperties.java | 154 + .../models/HiveJobStatementInfo.java | 121 + .../analytics/models/JobDataPath.java | 64 + .../analytics/models/JobErrorDetails.java | 231 + .../analytics/models/JobInformation.java | 343 + .../analytics/models/JobInformationBasic.java | 288 + .../analytics/models/JobInnerError.java | 186 + .../models/JobPipelineInformation.java | 204 + .../models/JobPipelineRunInformation.java | 49 + .../analytics/models/JobProperties.java | 78 + .../models/JobRecurrenceInformation.java | 157 + .../models/JobRelationshipProperties.java | 181 + .../analytics/models/JobResource.java | 96 + .../analytics/models/JobResourceType.java | 53 + .../datalake/analytics/models/JobResult.java | 59 + .../datalake/analytics/models/JobState.java | 77 + .../analytics/models/JobStateAuditRecord.java | 79 + .../analytics/models/JobStatistics.java | 49 + .../analytics/models/JobStatisticsVertex.java | 94 + .../models/JobStatisticsVertexStage.java | 317 + .../datalake/analytics/models/JobType.java | 53 + .../datalake/analytics/models/PageImpl.java | 75 + .../analytics/models/PermissionType.java | 56 + .../models/ResourceUsageStatistics.java | 62 + .../analytics/models/ScopeJobProperties.java | 177 + .../analytics/models/ScopeJobResource.java | 69 + .../analytics/models/SeverityTypes.java | 53 + .../analytics/models/TypeFieldInfo.java | 69 + .../analytics/models/USqlAssembly.java | 200 + .../analytics/models/USqlAssemblyClr.java | 95 + .../models/USqlAssemblyDependencyInfo.java | 43 + .../models/USqlAssemblyFileInfo.java | 95 + .../analytics/models/USqlCredential.java | 121 + .../analytics/models/USqlDatabase.java | 43 + .../analytics/models/USqlDirectedColumn.java | 69 + .../models/USqlDistributionInfo.java | 122 + .../models/USqlExternalDataSource.java | 148 + .../datalake/analytics/models/USqlIndex.java | 280 + .../analytics/models/USqlJobProperties.java | 255 + .../analytics/models/USqlPackage.java | 121 + .../analytics/models/USqlProcedure.java | 121 + .../datalake/analytics/models/USqlSchema.java | 69 + .../datalake/analytics/models/USqlSecret.java | 150 + .../datalake/analytics/models/USqlTable.java | 226 + .../analytics/models/USqlTableColumn.java | 69 + .../analytics/models/USqlTableFragment.java | 176 + .../analytics/models/USqlTablePartition.java | 202 + .../analytics/models/USqlTablePreview.java | 154 + .../analytics/models/USqlTableStatistics.java | 357 + .../analytics/models/USqlTableType.java | 33 + .../models/USqlTableValuedFunction.java | 121 + .../datalake/analytics/models/USqlType.java | 407 + .../datalake/analytics/models/USqlView.java | 121 + .../analytics/models/UpdateJobParameters.java | 126 + .../analytics/models/package-info.java | 11 + .../datalake/analytics/package-info.java | 11 + 92 files changed, 23160 insertions(+) create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Catalogs.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsJobManagementClient.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Jobs.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Pipelines.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Recurrences.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/CatalogsImpl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/JobsImpl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/PipelinesImpl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/RecurrencesImpl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/package-info.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Acl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclCreateOrUpdateParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclDeleteParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclType.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BaseJobParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BuildJobParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItem.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItemList.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CompileMode.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateUSqlJobProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialCreateParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialDeleteParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialUpdateParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DdlName.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Diagnostics.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/EntityId.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ExternalTable.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/FileType.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobStatementInfo.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobDataPath.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobErrorDetails.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformation.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformationBasic.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInnerError.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineInformation.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineRunInformation.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRecurrenceInformation.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRelationshipProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResource.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResourceType.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResult.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobState.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStateAuditRecord.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatistics.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertex.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertexStage.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobType.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PageImpl.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PermissionType.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ResourceUsageStatistics.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobResource.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/SeverityTypes.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/TypeFieldInfo.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssembly.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyClr.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyDependencyInfo.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyFileInfo.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlCredential.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDatabase.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDirectedColumn.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDistributionInfo.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlExternalDataSource.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlIndex.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlJobProperties.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlPackage.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlProcedure.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSchema.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSecret.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTable.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableColumn.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableFragment.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePartition.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePreview.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableStatistics.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableType.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableValuedFunction.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlType.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlView.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/UpdateJobParameters.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/package-info.java create mode 100644 azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/package-info.java diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Catalogs.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Catalogs.java new file mode 100644 index 000000000000..4ce05b768011 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Catalogs.java @@ -0,0 +1,2937 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters; +import com.microsoft.azure.datalake.analytics.models.USqlAssembly; +import com.microsoft.azure.datalake.analytics.models.USqlAssemblyClr; +import com.microsoft.azure.datalake.analytics.models.USqlCredential; +import com.microsoft.azure.datalake.analytics.models.USqlDatabase; +import com.microsoft.azure.datalake.analytics.models.USqlExternalDataSource; +import com.microsoft.azure.datalake.analytics.models.USqlProcedure; +import com.microsoft.azure.datalake.analytics.models.USqlSchema; +import com.microsoft.azure.datalake.analytics.models.USqlSecret; +import com.microsoft.azure.datalake.analytics.models.USqlTable; +import com.microsoft.azure.datalake.analytics.models.USqlTablePartition; +import com.microsoft.azure.datalake.analytics.models.USqlTableStatistics; +import com.microsoft.azure.datalake.analytics.models.USqlTableType; +import com.microsoft.azure.datalake.analytics.models.USqlTableValuedFunction; +import com.microsoft.azure.datalake.analytics.models.USqlType; +import com.microsoft.azure.datalake.analytics.models.USqlView; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Catalogs. + */ +public interface Catalogs { + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSecret object if successful. + */ + USqlSecret createSecret(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters); + + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback); + + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + Observable createSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters); + + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + Observable> createSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters); + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSecret object if successful. + */ + USqlSecret updateSecret(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters); + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture updateSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback); + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + Observable updateSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters); + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + Observable> updateSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters); + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSecret object if successful. + */ + USqlSecret getSecret(String accountName, String databaseName, String secretName); + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getSecretAsync(String accountName, String databaseName, String secretName, final ServiceCallback serviceCallback); + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + Observable getSecretAsync(String accountName, String databaseName, String secretName); + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + Observable> getSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName); + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + void deleteSecret(String accountName, String databaseName, String secretName); + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteSecretAsync(String accountName, String databaseName, String secretName, final ServiceCallback serviceCallback); + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteSecretAsync(String accountName, String databaseName, String secretName); + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName); + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + void deleteAllSecrets(String accountName, String databaseName); + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAllSecretsAsync(String accountName, String databaseName, final ServiceCallback serviceCallback); + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteAllSecretsAsync(String accountName, String databaseName); + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteAllSecretsWithServiceResponseAsync(String accountName, String databaseName); + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlExternalDataSource object if successful. + */ + USqlExternalDataSource getExternalDataSource(String accountName, String databaseName, String externalDataSourceName); + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getExternalDataSourceAsync(String accountName, String databaseName, String externalDataSourceName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlExternalDataSource object + */ + Observable getExternalDataSourceAsync(String accountName, String databaseName, String externalDataSourceName); + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlExternalDataSource object + */ + Observable> getExternalDataSourceWithServiceResponseAsync(String accountName, String databaseName, String externalDataSourceName); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlExternalDataSource> object if successful. + */ + PagedList listExternalDataSources(final String accountName, final String databaseName); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listExternalDataSourcesAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + Observable> listExternalDataSourcesAsync(final String accountName, final String databaseName); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + Observable>> listExternalDataSourcesWithServiceResponseAsync(final String accountName, final String databaseName); + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlExternalDataSource> object if successful. + */ + PagedList listExternalDataSources(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listExternalDataSourcesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + Observable> listExternalDataSourcesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + Observable>> listExternalDataSourcesWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlCredential object if successful. + */ + USqlCredential getCredential(String accountName, String databaseName, String credentialName); + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getCredentialAsync(String accountName, String databaseName, String credentialName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlCredential object + */ + Observable getCredentialAsync(String accountName, String databaseName, String credentialName); + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlCredential object + */ + Observable> getCredentialWithServiceResponseAsync(String accountName, String databaseName, String credentialName); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlCredential> object if successful. + */ + PagedList listCredentials(final String accountName, final String databaseName); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listCredentialsAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + Observable> listCredentialsAsync(final String accountName, final String databaseName); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + Observable>> listCredentialsWithServiceResponseAsync(final String accountName, final String databaseName); + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlCredential> object if successful. + */ + PagedList listCredentials(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listCredentialsAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + Observable> listCredentialsAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + Observable>> listCredentialsWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlProcedure object if successful. + */ + USqlProcedure getProcedure(String accountName, String databaseName, String schemaName, String procedureName); + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getProcedureAsync(String accountName, String databaseName, String schemaName, String procedureName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlProcedure object + */ + Observable getProcedureAsync(String accountName, String databaseName, String schemaName, String procedureName); + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlProcedure object + */ + Observable> getProcedureWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String procedureName); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlProcedure> object if successful. + */ + PagedList listProcedures(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listProceduresAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + Observable> listProceduresAsync(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + Observable>> listProceduresWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName); + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlProcedure> object if successful. + */ + PagedList listProcedures(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listProceduresAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + Observable> listProceduresAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + Observable>> listProceduresWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTable object if successful. + */ + USqlTable getTable(String accountName, String databaseName, String schemaName, String tableName); + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getTableAsync(String accountName, String databaseName, String schemaName, String tableName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTable object + */ + Observable getTableAsync(String accountName, String databaseName, String schemaName, String tableName); + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTable object + */ + Observable> getTableWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableName); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTable> object if successful. + */ + PagedList listTables(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTablesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + Observable> listTablesAsync(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + Observable>> listTablesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName); + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTable> object if successful. + */ + PagedList listTables(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTablesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + Observable> listTablesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + Observable>> listTablesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTableType object if successful. + */ + USqlTableType getTableType(String accountName, String databaseName, String schemaName, String tableTypeName); + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getTableTypeAsync(String accountName, String databaseName, String schemaName, String tableTypeName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableType object + */ + Observable getTableTypeAsync(String accountName, String databaseName, String schemaName, String tableTypeName); + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableType object + */ + Observable> getTableTypeWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableTypeName); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableType> object if successful. + */ + PagedList listTableTypes(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + Observable> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + Observable>> listTableTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName); + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableType> object if successful. + */ + PagedList listTableTypes(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + Observable> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + Observable>> listTableTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlView object if successful. + */ + USqlView getView(String accountName, String databaseName, String schemaName, String viewName); + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getViewAsync(String accountName, String databaseName, String schemaName, String viewName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlView object + */ + Observable getViewAsync(String accountName, String databaseName, String schemaName, String viewName); + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlView object + */ + Observable> getViewWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String viewName); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlView> object if successful. + */ + PagedList listViews(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listViewsAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + Observable> listViewsAsync(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + Observable>> listViewsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName); + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlView> object if successful. + */ + PagedList listViews(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listViewsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + Observable> listViewsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + Observable>> listViewsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTableStatistics object if successful. + */ + USqlTableStatistics getTableStatistic(String accountName, String databaseName, String schemaName, String tableName, String statisticsName); + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getTableStatisticAsync(String accountName, String databaseName, String schemaName, String tableName, String statisticsName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableStatistics object + */ + Observable getTableStatisticAsync(String accountName, String databaseName, String schemaName, String tableName, String statisticsName); + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableStatistics object + */ + Observable> getTableStatisticWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableName, String statisticsName); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableStatistics> object if successful. + */ + PagedList listTableStatistics(final String accountName, final String databaseName, final String schemaName, final String tableName); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + Observable> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + Observable>> listTableStatisticsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName); + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableStatistics> object if successful. + */ + PagedList listTableStatistics(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + Observable> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + Observable>> listTableStatisticsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTablePartition object if successful. + */ + USqlTablePartition getTablePartition(String accountName, String databaseName, String schemaName, String tableName, String partitionName); + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getTablePartitionAsync(String accountName, String databaseName, String schemaName, String tableName, String partitionName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTablePartition object + */ + Observable getTablePartitionAsync(String accountName, String databaseName, String schemaName, String tableName, String partitionName); + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTablePartition object + */ + Observable> getTablePartitionWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableName, String partitionName); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTablePartition> object if successful. + */ + PagedList listTablePartitions(final String accountName, final String databaseName, final String schemaName, final String tableName); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + Observable> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + Observable>> listTablePartitionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName); + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTablePartition> object if successful. + */ + PagedList listTablePartitions(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + Observable> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + Observable>> listTablePartitionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlType> object if successful. + */ + PagedList listTypes(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTypesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + Observable> listTypesAsync(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + Observable>> listTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName); + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlType> object if successful. + */ + PagedList listTypes(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + Observable> listTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + Observable>> listTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTableValuedFunction object if successful. + */ + USqlTableValuedFunction getTableValuedFunction(String accountName, String databaseName, String schemaName, String tableValuedFunctionName); + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getTableValuedFunctionAsync(String accountName, String databaseName, String schemaName, String tableValuedFunctionName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableValuedFunction object + */ + Observable getTableValuedFunctionAsync(String accountName, String databaseName, String schemaName, String tableValuedFunctionName); + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableValuedFunction object + */ + Observable> getTableValuedFunctionWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableValuedFunctionName); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableValuedFunction> object if successful. + */ + PagedList listTableValuedFunctions(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + Observable> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + Observable>> listTableValuedFunctionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName); + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableValuedFunction> object if successful. + */ + PagedList listTableValuedFunctions(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + Observable> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + Observable>> listTableValuedFunctionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlAssembly object if successful. + */ + USqlAssembly getAssembly(String accountName, String databaseName, String assemblyName); + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAssemblyAsync(String accountName, String databaseName, String assemblyName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlAssembly object + */ + Observable getAssemblyAsync(String accountName, String databaseName, String assemblyName); + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlAssembly object + */ + Observable> getAssemblyWithServiceResponseAsync(String accountName, String databaseName, String assemblyName); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlAssemblyClr> object if successful. + */ + PagedList listAssemblies(final String accountName, final String databaseName); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAssembliesAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + Observable> listAssembliesAsync(final String accountName, final String databaseName); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + Observable>> listAssembliesWithServiceResponseAsync(final String accountName, final String databaseName); + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlAssemblyClr> object if successful. + */ + PagedList listAssemblies(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAssembliesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + Observable> listAssembliesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + Observable>> listAssembliesWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSchema object if successful. + */ + USqlSchema getSchema(String accountName, String databaseName, String schemaName); + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getSchemaAsync(String accountName, String databaseName, String schemaName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSchema object + */ + Observable getSchemaAsync(String accountName, String databaseName, String schemaName); + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSchema object + */ + Observable> getSchemaWithServiceResponseAsync(String accountName, String databaseName, String schemaName); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlSchema> object if successful. + */ + PagedList listSchemas(final String accountName, final String databaseName); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listSchemasAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + Observable> listSchemasAsync(final String accountName, final String databaseName); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + Observable>> listSchemasWithServiceResponseAsync(final String accountName, final String databaseName); + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlSchema> object if successful. + */ + PagedList listSchemas(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listSchemasAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + Observable> listSchemasAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + Observable>> listSchemasWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlDatabase object if successful. + */ + USqlDatabase getDatabase(String accountName, String databaseName); + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getDatabaseAsync(String accountName, String databaseName, final ServiceCallback serviceCallback); + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlDatabase object + */ + Observable getDatabaseAsync(String accountName, String databaseName); + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlDatabase object + */ + Observable> getDatabaseWithServiceResponseAsync(String accountName, String databaseName); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlDatabase> object if successful. + */ + PagedList listDatabases(final String accountName); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listDatabasesAsync(final String accountName, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + Observable> listDatabasesAsync(final String accountName); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + Observable>> listDatabasesWithServiceResponseAsync(final String accountName); + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlDatabase> object if successful. + */ + PagedList listDatabases(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listDatabasesAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + Observable> listDatabasesAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + Observable>> listDatabasesWithServiceResponseAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlExternalDataSource> object if successful. + */ + PagedList listExternalDataSourcesNext(final String nextPageLink); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listExternalDataSourcesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + Observable> listExternalDataSourcesNextAsync(final String nextPageLink); + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + Observable>> listExternalDataSourcesNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlCredential> object if successful. + */ + PagedList listCredentialsNext(final String nextPageLink); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listCredentialsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + Observable> listCredentialsNextAsync(final String nextPageLink); + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + Observable>> listCredentialsNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlProcedure> object if successful. + */ + PagedList listProceduresNext(final String nextPageLink); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listProceduresNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + Observable> listProceduresNextAsync(final String nextPageLink); + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + Observable>> listProceduresNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTable> object if successful. + */ + PagedList listTablesNext(final String nextPageLink); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTablesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + Observable> listTablesNextAsync(final String nextPageLink); + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + Observable>> listTablesNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableType> object if successful. + */ + PagedList listTableTypesNext(final String nextPageLink); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableTypesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + Observable> listTableTypesNextAsync(final String nextPageLink); + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + Observable>> listTableTypesNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlView> object if successful. + */ + PagedList listViewsNext(final String nextPageLink); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listViewsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + Observable> listViewsNextAsync(final String nextPageLink); + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + Observable>> listViewsNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableStatistics> object if successful. + */ + PagedList listTableStatisticsNext(final String nextPageLink); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableStatisticsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + Observable> listTableStatisticsNextAsync(final String nextPageLink); + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + Observable>> listTableStatisticsNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTablePartition> object if successful. + */ + PagedList listTablePartitionsNext(final String nextPageLink); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTablePartitionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + Observable> listTablePartitionsNextAsync(final String nextPageLink); + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + Observable>> listTablePartitionsNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlType> object if successful. + */ + PagedList listTypesNext(final String nextPageLink); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTypesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + Observable> listTypesNextAsync(final String nextPageLink); + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + Observable>> listTypesNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableValuedFunction> object if successful. + */ + PagedList listTableValuedFunctionsNext(final String nextPageLink); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listTableValuedFunctionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + Observable> listTableValuedFunctionsNextAsync(final String nextPageLink); + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + Observable>> listTableValuedFunctionsNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlAssemblyClr> object if successful. + */ + PagedList listAssembliesNext(final String nextPageLink); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAssembliesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + Observable> listAssembliesNextAsync(final String nextPageLink); + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + Observable>> listAssembliesNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlSchema> object if successful. + */ + PagedList listSchemasNext(final String nextPageLink); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listSchemasNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + Observable> listSchemasNextAsync(final String nextPageLink); + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + Observable>> listSchemasNextWithServiceResponseAsync(final String nextPageLink); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlDatabase> object if successful. + */ + PagedList listDatabasesNext(final String nextPageLink); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listDatabasesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + Observable> listDatabasesNextAsync(final String nextPageLink); + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + Observable>> listDatabasesNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java new file mode 100644 index 000000000000..87cf12462132 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics; + +import com.microsoft.azure.AzureClient; +import com.microsoft.rest.RestClient; + +/** + * The interface for DataLakeAnalyticsCatalogManagementClient class. + */ +public interface DataLakeAnalyticsCatalogManagementClient { + /** + * Gets the REST client. + * + * @return the {@link RestClient} object. + */ + RestClient restClient(); + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + AzureClient getAzureClient(); + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + String userAgent(); + + /** + * Gets Client Api Version.. + * + * @return the apiVersion value. + */ + String apiVersion(); + + /** + * Gets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Catalog service requests.. + * + * @return the adlaCatalogDnsSuffix value. + */ + String adlaCatalogDnsSuffix(); + + /** + * Sets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Catalog service requests.. + * + * @param adlaCatalogDnsSuffix the adlaCatalogDnsSuffix value. + * @return the service client itself + */ + DataLakeAnalyticsCatalogManagementClient withAdlaCatalogDnsSuffix(String adlaCatalogDnsSuffix); + + /** + * Gets Gets or sets the preferred language for the response.. + * + * @return the acceptLanguage value. + */ + String acceptLanguage(); + + /** + * Sets Gets or sets the preferred language for the response.. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + DataLakeAnalyticsCatalogManagementClient withAcceptLanguage(String acceptLanguage); + + /** + * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @return the longRunningOperationRetryTimeout value. + */ + int longRunningOperationRetryTimeout(); + + /** + * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + DataLakeAnalyticsCatalogManagementClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout); + + /** + * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @return the generateClientRequestId value. + */ + boolean generateClientRequestId(); + + /** + * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + DataLakeAnalyticsCatalogManagementClient withGenerateClientRequestId(boolean generateClientRequestId); + + /** + * Gets the Catalogs object to access its operations. + * @return the Catalogs object. + */ + Catalogs catalogs(); + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsJobManagementClient.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsJobManagementClient.java new file mode 100644 index 000000000000..e2ba89aeb5a5 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/DataLakeAnalyticsJobManagementClient.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics; + +import com.microsoft.azure.AzureClient; +import com.microsoft.rest.RestClient; + +/** + * The interface for DataLakeAnalyticsJobManagementClient class. + */ +public interface DataLakeAnalyticsJobManagementClient { + /** + * Gets the REST client. + * + * @return the {@link RestClient} object. + */ + RestClient restClient(); + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + AzureClient getAzureClient(); + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + String userAgent(); + + /** + * Gets Client Api Version.. + * + * @return the apiVersion value. + */ + String apiVersion(); + + /** + * Gets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Job service requests.. + * + * @return the adlaJobDnsSuffix value. + */ + String adlaJobDnsSuffix(); + + /** + * Sets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Job service requests.. + * + * @param adlaJobDnsSuffix the adlaJobDnsSuffix value. + * @return the service client itself + */ + DataLakeAnalyticsJobManagementClient withAdlaJobDnsSuffix(String adlaJobDnsSuffix); + + /** + * Gets Gets or sets the preferred language for the response.. + * + * @return the acceptLanguage value. + */ + String acceptLanguage(); + + /** + * Sets Gets or sets the preferred language for the response.. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + DataLakeAnalyticsJobManagementClient withAcceptLanguage(String acceptLanguage); + + /** + * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @return the longRunningOperationRetryTimeout value. + */ + int longRunningOperationRetryTimeout(); + + /** + * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + DataLakeAnalyticsJobManagementClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout); + + /** + * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @return the generateClientRequestId value. + */ + boolean generateClientRequestId(); + + /** + * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + DataLakeAnalyticsJobManagementClient withGenerateClientRequestId(boolean generateClientRequestId); + + /** + * Gets the Jobs object to access its operations. + * @return the Jobs object. + */ + Jobs jobs(); + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Jobs.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Jobs.java new file mode 100644 index 000000000000..fe6ecd60919d --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Jobs.java @@ -0,0 +1,445 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.JobDataPath; +import com.microsoft.azure.datalake.analytics.models.JobInformation; +import com.microsoft.azure.datalake.analytics.models.JobStatistics; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Jobs. + */ +public interface Jobs { + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobStatistics object if successful. + */ + JobStatistics getStatistics(String accountName, UUID jobIdentity); + + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getStatisticsAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback); + + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobStatistics object + */ + Observable getStatisticsAsync(String accountName, UUID jobIdentity); + + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobStatistics object + */ + Observable> getStatisticsWithServiceResponseAsync(String accountName, UUID jobIdentity); + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobDataPath object if successful. + */ + JobDataPath getDebugDataPath(String accountName, UUID jobIdentity); + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getDebugDataPathAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback); + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobDataPath object + */ + Observable getDebugDataPathAsync(String accountName, UUID jobIdentity); + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobDataPath object + */ + Observable> getDebugDataPathWithServiceResponseAsync(String accountName, UUID jobIdentity); + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInformation object if successful. + */ + JobInformation build(String accountName, JobInformation parameters); + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture buildAsync(String accountName, JobInformation parameters, final ServiceCallback serviceCallback); + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + Observable buildAsync(String accountName, JobInformation parameters); + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + Observable> buildWithServiceResponseAsync(String accountName, JobInformation parameters); + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + void cancel(String accountName, UUID jobIdentity); + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture cancelAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback); + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable cancelAsync(String accountName, UUID jobIdentity); + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> cancelWithServiceResponseAsync(String accountName, UUID jobIdentity); + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInformation object if successful. + */ + JobInformation get(String accountName, UUID jobIdentity); + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback); + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + Observable getAsync(String accountName, UUID jobIdentity); + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + Observable> getWithServiceResponseAsync(String accountName, UUID jobIdentity); + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInformation object if successful. + */ + JobInformation create(String accountName, UUID jobIdentity, JobInformation parameters); + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createAsync(String accountName, UUID jobIdentity, JobInformation parameters, final ServiceCallback serviceCallback); + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + Observable createAsync(String accountName, UUID jobIdentity, JobInformation parameters); + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + Observable> createWithServiceResponseAsync(String accountName, UUID jobIdentity, JobInformation parameters); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInformation> object if successful. + */ + PagedList list(final String accountName); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String accountName, final ListOperationCallback serviceCallback); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + Observable> listAsync(final String accountName); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + Observable>> listWithServiceResponseAsync(final String accountName); + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInformation> object if successful. + */ + PagedList list(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format, final ListOperationCallback serviceCallback); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + Observable> listAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + Observable>> listWithServiceResponseAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInformation> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Pipelines.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Pipelines.java new file mode 100644 index 000000000000..25c51b69fc6a --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Pipelines.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.JobPipelineInformation; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Pipelines. + */ +public interface Pipelines { + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobPipelineInformation> object if successful. + */ + PagedList list(final String accountName); + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String accountName, final ListOperationCallback serviceCallback); + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + Observable> listAsync(final String accountName); + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + Observable>> listWithServiceResponseAsync(final String accountName); + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobPipelineInformation> object if successful. + */ + PagedList list(final String accountName, final DateTime startDateTime, final DateTime endDateTime); + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime, final ListOperationCallback serviceCallback); + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + Observable> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime); + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + Observable>> listWithServiceResponseAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime); + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobPipelineInformation object if successful. + */ + JobPipelineInformation get(String accountName, UUID pipelineIdentity); + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String accountName, UUID pipelineIdentity, final ServiceCallback serviceCallback); + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + Observable getAsync(String accountName, UUID pipelineIdentity); + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + Observable> getWithServiceResponseAsync(String accountName, UUID pipelineIdentity); + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobPipelineInformation object if successful. + */ + JobPipelineInformation get(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime); + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime, final ServiceCallback serviceCallback); + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + Observable getAsync(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime); + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + Observable> getWithServiceResponseAsync(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime); + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobPipelineInformation> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Recurrences.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Recurrences.java new file mode 100644 index 000000000000..5d51a449b74b --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/Recurrences.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.JobRecurrenceInformation; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Recurrences. + */ +public interface Recurrences { + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobRecurrenceInformation> object if successful. + */ + PagedList list(final String accountName); + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String accountName, final ListOperationCallback serviceCallback); + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + Observable> listAsync(final String accountName); + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + Observable>> listWithServiceResponseAsync(final String accountName); + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobRecurrenceInformation> object if successful. + */ + PagedList list(final String accountName, final DateTime startDateTime, final DateTime endDateTime); + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime, final ListOperationCallback serviceCallback); + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + Observable> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime); + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + Observable>> listWithServiceResponseAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime); + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobRecurrenceInformation object if successful. + */ + JobRecurrenceInformation get(String accountName, UUID recurrenceIdentity); + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String accountName, UUID recurrenceIdentity, final ServiceCallback serviceCallback); + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + Observable getAsync(String accountName, UUID recurrenceIdentity); + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + Observable> getWithServiceResponseAsync(String accountName, UUID recurrenceIdentity); + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobRecurrenceInformation object if successful. + */ + JobRecurrenceInformation get(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime); + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime, final ServiceCallback serviceCallback); + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + Observable getAsync(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime); + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + Observable> getWithServiceResponseAsync(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime); + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobRecurrenceInformation> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/CatalogsImpl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/CatalogsImpl.java new file mode 100644 index 000000000000..9207cc8fde5c --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/CatalogsImpl.java @@ -0,0 +1,7185 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.datalake.analytics.Catalogs; +import com.google.common.base.Joiner; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters; +import com.microsoft.azure.datalake.analytics.models.PageImpl; +import com.microsoft.azure.datalake.analytics.models.USqlAssembly; +import com.microsoft.azure.datalake.analytics.models.USqlAssemblyClr; +import com.microsoft.azure.datalake.analytics.models.USqlCredential; +import com.microsoft.azure.datalake.analytics.models.USqlDatabase; +import com.microsoft.azure.datalake.analytics.models.USqlExternalDataSource; +import com.microsoft.azure.datalake.analytics.models.USqlProcedure; +import com.microsoft.azure.datalake.analytics.models.USqlSchema; +import com.microsoft.azure.datalake.analytics.models.USqlSecret; +import com.microsoft.azure.datalake.analytics.models.USqlTable; +import com.microsoft.azure.datalake.analytics.models.USqlTablePartition; +import com.microsoft.azure.datalake.analytics.models.USqlTableStatistics; +import com.microsoft.azure.datalake.analytics.models.USqlTableType; +import com.microsoft.azure.datalake.analytics.models.USqlTableValuedFunction; +import com.microsoft.azure.datalake.analytics.models.USqlType; +import com.microsoft.azure.datalake.analytics.models.USqlView; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Catalogs. + */ +public class CatalogsImpl implements Catalogs { + /** The Retrofit service to perform REST calls. */ + private CatalogsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsCatalogManagementClientImpl client; + + /** + * Initializes an instance of CatalogsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public CatalogsImpl(Retrofit retrofit, DataLakeAnalyticsCatalogManagementClientImpl client) { + this.service = retrofit.create(CatalogsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Catalogs to be + * used by Retrofit to perform actually REST calls. + */ + interface CatalogsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs createSecret" }) + @PUT("catalog/usql/databases/{databaseName}/secrets/{secretName}") + Observable> createSecret(@Path("databaseName") String databaseName, @Path("secretName") String secretName, @Body DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs updateSecret" }) + @PATCH("catalog/usql/databases/{databaseName}/secrets/{secretName}") + Observable> updateSecret(@Path("databaseName") String databaseName, @Path("secretName") String secretName, @Body DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getSecret" }) + @GET("catalog/usql/databases/{databaseName}/secrets/{secretName}") + Observable> getSecret(@Path("databaseName") String databaseName, @Path("secretName") String secretName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs deleteSecret" }) + @HTTP(path = "catalog/usql/databases/{databaseName}/secrets/{secretName}", method = "DELETE", hasBody = true) + Observable> deleteSecret(@Path("databaseName") String databaseName, @Path("secretName") String secretName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs deleteAllSecrets" }) + @HTTP(path = "catalog/usql/databases/{databaseName}/secrets", method = "DELETE", hasBody = true) + Observable> deleteAllSecrets(@Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getExternalDataSource" }) + @GET("catalog/usql/databases/{databaseName}/externaldatasources/{externalDataSourceName}") + Observable> getExternalDataSource(@Path("databaseName") String databaseName, @Path("externalDataSourceName") String externalDataSourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listExternalDataSources" }) + @GET("catalog/usql/databases/{databaseName}/externaldatasources") + Observable> listExternalDataSources(@Path("databaseName") String databaseName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getCredential" }) + @GET("catalog/usql/databases/{databaseName}/credentials/{credentialName}") + Observable> getCredential(@Path("databaseName") String databaseName, @Path("credentialName") String credentialName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listCredentials" }) + @GET("catalog/usql/databases/{databaseName}/credentials") + Observable> listCredentials(@Path("databaseName") String databaseName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getProcedure" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/procedures/{procedureName}") + Observable> getProcedure(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("procedureName") String procedureName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listProcedures" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/procedures") + Observable> listProcedures(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getTable" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") + Observable> getTable(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTables" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables") + Observable> listTables(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getTableType" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tabletypes/{tableTypeName}") + Observable> getTableType(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableTypeName") String tableTypeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTableTypes" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tabletypes") + Observable> listTableTypes(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getView" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/views/{viewName}") + Observable> getView(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("viewName") String viewName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listViews" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/views") + Observable> listViews(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getTableStatistic" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/statistics/{statisticsName}") + Observable> getTableStatistic(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Path("statisticsName") String statisticsName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTableStatistics" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/statistics") + Observable> listTableStatistics(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getTablePartition" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}") + Observable> getTablePartition(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Path("partitionName") String partitionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTablePartitions" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions") + Observable> listTablePartitions(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTypes" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/types") + Observable> listTypes(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getTableValuedFunction" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tablevaluedfunctions/{tableValuedFunctionName}") + Observable> getTableValuedFunction(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableValuedFunctionName") String tableValuedFunctionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTableValuedFunctions" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tablevaluedfunctions") + Observable> listTableValuedFunctions(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getAssembly" }) + @GET("catalog/usql/databases/{databaseName}/assemblies/{assemblyName}") + Observable> getAssembly(@Path("databaseName") String databaseName, @Path("assemblyName") String assemblyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listAssemblies" }) + @GET("catalog/usql/databases/{databaseName}/assemblies") + Observable> listAssemblies(@Path("databaseName") String databaseName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getSchema" }) + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}") + Observable> getSchema(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listSchemas" }) + @GET("catalog/usql/databases/{databaseName}/schemas") + Observable> listSchemas(@Path("databaseName") String databaseName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs getDatabase" }) + @GET("catalog/usql/databases/{databaseName}") + Observable> getDatabase(@Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listDatabases" }) + @GET("catalog/usql/databases") + Observable> listDatabases(@Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listExternalDataSourcesNext" }) + @GET + Observable> listExternalDataSourcesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listCredentialsNext" }) + @GET + Observable> listCredentialsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listProceduresNext" }) + @GET + Observable> listProceduresNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTablesNext" }) + @GET + Observable> listTablesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTableTypesNext" }) + @GET + Observable> listTableTypesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listViewsNext" }) + @GET + Observable> listViewsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTableStatisticsNext" }) + @GET + Observable> listTableStatisticsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTablePartitionsNext" }) + @GET + Observable> listTablePartitionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTypesNext" }) + @GET + Observable> listTypesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listTableValuedFunctionsNext" }) + @GET + Observable> listTableValuedFunctionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listAssembliesNext" }) + @GET + Observable> listAssembliesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listSchemasNext" }) + @GET + Observable> listSchemasNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Catalogs listDatabasesNext" }) + @GET + Observable> listDatabasesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSecret object if successful. + */ + public USqlSecret createSecret(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters) { + return createSecretWithServiceResponseAsync(accountName, databaseName, secretName, parameters).toBlocking().single().body(); + } + + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createSecretWithServiceResponseAsync(accountName, databaseName, secretName, parameters), serviceCallback); + } + + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + public Observable createSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters) { + return createSecretWithServiceResponseAsync(accountName, databaseName, secretName, parameters).map(new Func1, USqlSecret>() { + @Override + public USqlSecret call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database in which to create the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to create the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + public Observable> createSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (secretName == null) { + throw new IllegalArgumentException("Parameter secretName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.createSecret(databaseName, secretName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSecret object if successful. + */ + public USqlSecret updateSecret(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters) { + return updateSecretWithServiceResponseAsync(accountName, databaseName, secretName, parameters).toBlocking().single().body(); + } + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSecretWithServiceResponseAsync(accountName, databaseName, secretName, parameters), serviceCallback); + } + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + public Observable updateSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters) { + return updateSecretWithServiceResponseAsync(accountName, databaseName, secretName, parameters).map(new Func1, USqlSecret>() { + @Override + public USqlSecret call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Modifies the specified secret for use with external data sources in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret. + * @param parameters The parameters required to modify the secret (name and password) + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + public Observable> updateSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (secretName == null) { + throw new IllegalArgumentException("Parameter secretName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.updateSecret(databaseName, secretName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSecret object if successful. + */ + public USqlSecret getSecret(String accountName, String databaseName, String secretName) { + return getSecretWithServiceResponseAsync(accountName, databaseName, secretName).toBlocking().single().body(); + } + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSecretAsync(String accountName, String databaseName, String secretName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSecretWithServiceResponseAsync(accountName, databaseName, secretName), serviceCallback); + } + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + public Observable getSecretAsync(String accountName, String databaseName, String secretName) { + return getSecretWithServiceResponseAsync(accountName, databaseName, secretName).map(new Func1, USqlSecret>() { + @Override + public USqlSecret call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to get + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSecret object + */ + public Observable> getSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (secretName == null) { + throw new IllegalArgumentException("Parameter secretName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getSecret(databaseName, secretName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSecret(String accountName, String databaseName, String secretName) { + deleteSecretWithServiceResponseAsync(accountName, databaseName, secretName).toBlocking().single().body(); + } + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteSecretAsync(String accountName, String databaseName, String secretName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSecretWithServiceResponseAsync(accountName, databaseName, secretName), serviceCallback); + } + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteSecretAsync(String accountName, String databaseName, String secretName) { + return deleteSecretWithServiceResponseAsync(accountName, databaseName, secretName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified secret in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param secretName The name of the secret to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteSecretWithServiceResponseAsync(String accountName, String databaseName, String secretName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (secretName == null) { + throw new IllegalArgumentException("Parameter secretName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.deleteSecret(databaseName, secretName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteAllSecrets(String accountName, String databaseName) { + deleteAllSecretsWithServiceResponseAsync(accountName, databaseName).toBlocking().single().body(); + } + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAllSecretsAsync(String accountName, String databaseName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteAllSecretsWithServiceResponseAsync(accountName, databaseName), serviceCallback); + } + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAllSecretsAsync(String accountName, String databaseName) { + return deleteAllSecretsWithServiceResponseAsync(accountName, databaseName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes all secrets in the specified database. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the secret. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteAllSecretsWithServiceResponseAsync(String accountName, String databaseName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.deleteAllSecrets(databaseName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteAllSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteAllSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlExternalDataSource object if successful. + */ + public USqlExternalDataSource getExternalDataSource(String accountName, String databaseName, String externalDataSourceName) { + return getExternalDataSourceWithServiceResponseAsync(accountName, databaseName, externalDataSourceName).toBlocking().single().body(); + } + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getExternalDataSourceAsync(String accountName, String databaseName, String externalDataSourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getExternalDataSourceWithServiceResponseAsync(accountName, databaseName, externalDataSourceName), serviceCallback); + } + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlExternalDataSource object + */ + public Observable getExternalDataSourceAsync(String accountName, String databaseName, String externalDataSourceName) { + return getExternalDataSourceWithServiceResponseAsync(accountName, databaseName, externalDataSourceName).map(new Func1, USqlExternalDataSource>() { + @Override + public USqlExternalDataSource call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified external data source from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data source. + * @param externalDataSourceName The name of the external data source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlExternalDataSource object + */ + public Observable> getExternalDataSourceWithServiceResponseAsync(String accountName, String databaseName, String externalDataSourceName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (externalDataSourceName == null) { + throw new IllegalArgumentException("Parameter externalDataSourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getExternalDataSource(databaseName, externalDataSourceName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getExternalDataSourceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getExternalDataSourceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlExternalDataSource> object if successful. + */ + public PagedList listExternalDataSources(final String accountName, final String databaseName) { + ServiceResponse> response = listExternalDataSourcesSinglePageAsync(accountName, databaseName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExternalDataSourcesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listExternalDataSourcesAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExternalDataSourcesSinglePageAsync(accountName, databaseName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExternalDataSourcesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + public Observable> listExternalDataSourcesAsync(final String accountName, final String databaseName) { + return listExternalDataSourcesWithServiceResponseAsync(accountName, databaseName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + public Observable>> listExternalDataSourcesWithServiceResponseAsync(final String accountName, final String databaseName) { + return listExternalDataSourcesSinglePageAsync(accountName, databaseName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listExternalDataSourcesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlExternalDataSource> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExternalDataSourcesSinglePageAsync(final String accountName, final String databaseName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listExternalDataSources(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExternalDataSourcesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlExternalDataSource> object if successful. + */ + public PagedList listExternalDataSources(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listExternalDataSourcesSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExternalDataSourcesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listExternalDataSourcesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExternalDataSourcesSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExternalDataSourcesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + public Observable> listExternalDataSourcesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listExternalDataSourcesWithServiceResponseAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the external data sources. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + public Observable>> listExternalDataSourcesWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listExternalDataSourcesSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listExternalDataSourcesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the external data sources. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlExternalDataSource> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExternalDataSourcesSinglePageAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listExternalDataSources(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExternalDataSourcesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExternalDataSourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlCredential object if successful. + */ + public USqlCredential getCredential(String accountName, String databaseName, String credentialName) { + return getCredentialWithServiceResponseAsync(accountName, databaseName, credentialName).toBlocking().single().body(); + } + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getCredentialAsync(String accountName, String databaseName, String credentialName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getCredentialWithServiceResponseAsync(accountName, databaseName, credentialName), serviceCallback); + } + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlCredential object + */ + public Observable getCredentialAsync(String accountName, String databaseName, String credentialName) { + return getCredentialWithServiceResponseAsync(accountName, databaseName, credentialName).map(new Func1, USqlCredential>() { + @Override + public USqlCredential call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified credential from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param credentialName The name of the credential. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlCredential object + */ + public Observable> getCredentialWithServiceResponseAsync(String accountName, String databaseName, String credentialName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (credentialName == null) { + throw new IllegalArgumentException("Parameter credentialName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getCredential(databaseName, credentialName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getCredentialDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getCredentialDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlCredential> object if successful. + */ + public PagedList listCredentials(final String accountName, final String databaseName) { + ServiceResponse> response = listCredentialsSinglePageAsync(accountName, databaseName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listCredentialsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCredentialsAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listCredentialsSinglePageAsync(accountName, databaseName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCredentialsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + public Observable> listCredentialsAsync(final String accountName, final String databaseName) { + return listCredentialsWithServiceResponseAsync(accountName, databaseName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + public Observable>> listCredentialsWithServiceResponseAsync(final String accountName, final String databaseName) { + return listCredentialsSinglePageAsync(accountName, databaseName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCredentialsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlCredential> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listCredentialsSinglePageAsync(final String accountName, final String databaseName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listCredentials(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlCredential> object if successful. + */ + public PagedList listCredentials(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listCredentialsSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listCredentialsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCredentialsAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listCredentialsSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCredentialsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + public Observable> listCredentialsAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listCredentialsWithServiceResponseAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + public Observable>> listCredentialsWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listCredentialsSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCredentialsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the schema. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlCredential> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listCredentialsSinglePageAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listCredentials(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlProcedure object if successful. + */ + public USqlProcedure getProcedure(String accountName, String databaseName, String schemaName, String procedureName) { + return getProcedureWithServiceResponseAsync(accountName, databaseName, schemaName, procedureName).toBlocking().single().body(); + } + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getProcedureAsync(String accountName, String databaseName, String schemaName, String procedureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getProcedureWithServiceResponseAsync(accountName, databaseName, schemaName, procedureName), serviceCallback); + } + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlProcedure object + */ + public Observable getProcedureAsync(String accountName, String databaseName, String schemaName, String procedureName) { + return getProcedureWithServiceResponseAsync(accountName, databaseName, schemaName, procedureName).map(new Func1, USqlProcedure>() { + @Override + public USqlProcedure call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified procedure from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedure. + * @param schemaName The name of the schema containing the procedure. + * @param procedureName The name of the procedure. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlProcedure object + */ + public Observable> getProcedureWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String procedureName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (procedureName == null) { + throw new IllegalArgumentException("Parameter procedureName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getProcedure(databaseName, schemaName, procedureName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcedureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcedureDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlProcedure> object if successful. + */ + public PagedList listProcedures(final String accountName, final String databaseName, final String schemaName) { + ServiceResponse> response = listProceduresSinglePageAsync(accountName, databaseName, schemaName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProceduresNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProceduresAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProceduresSinglePageAsync(accountName, databaseName, schemaName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProceduresNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + public Observable> listProceduresAsync(final String accountName, final String databaseName, final String schemaName) { + return listProceduresWithServiceResponseAsync(accountName, databaseName, schemaName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + public Observable>> listProceduresWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName) { + return listProceduresSinglePageAsync(accountName, databaseName, schemaName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProceduresNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlProcedure> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProceduresSinglePageAsync(final String accountName, final String databaseName, final String schemaName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listProcedures(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProceduresDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlProcedure> object if successful. + */ + public PagedList listProcedures(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listProceduresSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProceduresNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProceduresAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProceduresSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProceduresNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + public Observable> listProceduresAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listProceduresWithServiceResponseAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the procedures. + * @param schemaName The name of the schema containing the procedures. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + public Observable>> listProceduresWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listProceduresSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProceduresNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the procedures. + ServiceResponse> * @param schemaName The name of the schema containing the procedures. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlProcedure> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProceduresSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listProcedures(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProceduresDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProceduresDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTable object if successful. + */ + public USqlTable getTable(String accountName, String databaseName, String schemaName, String tableName) { + return getTableWithServiceResponseAsync(accountName, databaseName, schemaName, tableName).toBlocking().single().body(); + } + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTableAsync(String accountName, String databaseName, String schemaName, String tableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTableWithServiceResponseAsync(accountName, databaseName, schemaName, tableName), serviceCallback); + } + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTable object + */ + public Observable getTableAsync(String accountName, String databaseName, String schemaName, String tableName) { + return getTableWithServiceResponseAsync(accountName, databaseName, schemaName, tableName).map(new Func1, USqlTable>() { + @Override + public USqlTable call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified table from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table. + * @param schemaName The name of the schema containing the table. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTable object + */ + public Observable> getTableWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getTable(databaseName, schemaName, tableName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTable> object if successful. + */ + public PagedList listTables(final String accountName, final String databaseName, final String schemaName) { + ServiceResponse> response = listTablesSinglePageAsync(accountName, databaseName, schemaName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTablesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTablesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTablesSinglePageAsync(accountName, databaseName, schemaName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTablesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + public Observable> listTablesAsync(final String accountName, final String databaseName, final String schemaName) { + return listTablesWithServiceResponseAsync(accountName, databaseName, schemaName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + public Observable>> listTablesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName) { + return listTablesSinglePageAsync(accountName, databaseName, schemaName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTablesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTable> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTablesSinglePageAsync(final String accountName, final String databaseName, final String schemaName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTables(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTablesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTable> object if successful. + */ + public PagedList listTables(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listTablesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTablesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTablesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTablesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTablesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + public Observable> listTablesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTablesWithServiceResponseAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the tables. + * @param schemaName The name of the schema containing the tables. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + public Observable>> listTablesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTablesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTablesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the tables. + ServiceResponse> * @param schemaName The name of the schema containing the tables. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTable> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTablesSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTables(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTablesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTablesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTableType object if successful. + */ + public USqlTableType getTableType(String accountName, String databaseName, String schemaName, String tableTypeName) { + return getTableTypeWithServiceResponseAsync(accountName, databaseName, schemaName, tableTypeName).toBlocking().single().body(); + } + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTableTypeAsync(String accountName, String databaseName, String schemaName, String tableTypeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTableTypeWithServiceResponseAsync(accountName, databaseName, schemaName, tableTypeName), serviceCallback); + } + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableType object + */ + public Observable getTableTypeAsync(String accountName, String databaseName, String schemaName, String tableTypeName) { + return getTableTypeWithServiceResponseAsync(accountName, databaseName, schemaName, tableTypeName).map(new Func1, USqlTableType>() { + @Override + public USqlTableType call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableType object + */ + public Observable> getTableTypeWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableTypeName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableTypeName == null) { + throw new IllegalArgumentException("Parameter tableTypeName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getTableType(databaseName, schemaName, tableTypeName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTableTypeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTableTypeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableType> object if successful. + */ + public PagedList listTableTypes(final String accountName, final String databaseName, final String schemaName) { + ServiceResponse> response = listTableTypesSinglePageAsync(accountName, databaseName, schemaName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableTypesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableTypesSinglePageAsync(accountName, databaseName, schemaName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableTypesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + public Observable> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName) { + return listTableTypesWithServiceResponseAsync(accountName, databaseName, schemaName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + public Observable>> listTableTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName) { + return listTableTypesSinglePageAsync(accountName, databaseName, schemaName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableTypesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableTypesSinglePageAsync(final String accountName, final String databaseName, final String schemaName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTableTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableTypesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableType> object if successful. + */ + public PagedList listTableTypes(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listTableTypesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableTypesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableTypesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableTypesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + public Observable> listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTableTypesWithServiceResponseAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + public Observable>> listTableTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTableTypesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableTypesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the table types. + ServiceResponse> * @param schemaName The name of the schema containing the table types. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableTypesSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTableTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableTypesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTableTypesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlView object if successful. + */ + public USqlView getView(String accountName, String databaseName, String schemaName, String viewName) { + return getViewWithServiceResponseAsync(accountName, databaseName, schemaName, viewName).toBlocking().single().body(); + } + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getViewAsync(String accountName, String databaseName, String schemaName, String viewName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getViewWithServiceResponseAsync(accountName, databaseName, schemaName, viewName), serviceCallback); + } + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlView object + */ + public Observable getViewAsync(String accountName, String databaseName, String schemaName, String viewName) { + return getViewWithServiceResponseAsync(accountName, databaseName, schemaName, viewName).map(new Func1, USqlView>() { + @Override + public USqlView call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified view from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the view. + * @param schemaName The name of the schema containing the view. + * @param viewName The name of the view. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlView object + */ + public Observable> getViewWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String viewName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (viewName == null) { + throw new IllegalArgumentException("Parameter viewName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getView(databaseName, schemaName, viewName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getViewDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getViewDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlView> object if successful. + */ + public PagedList listViews(final String accountName, final String databaseName, final String schemaName) { + ServiceResponse> response = listViewsSinglePageAsync(accountName, databaseName, schemaName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listViewsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listViewsAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listViewsSinglePageAsync(accountName, databaseName, schemaName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listViewsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + public Observable> listViewsAsync(final String accountName, final String databaseName, final String schemaName) { + return listViewsWithServiceResponseAsync(accountName, databaseName, schemaName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + public Observable>> listViewsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName) { + return listViewsSinglePageAsync(accountName, databaseName, schemaName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listViewsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlView> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listViewsSinglePageAsync(final String accountName, final String databaseName, final String schemaName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listViews(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listViewsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlView> object if successful. + */ + public PagedList listViews(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listViewsSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listViewsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listViewsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listViewsSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listViewsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + public Observable> listViewsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listViewsWithServiceResponseAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the views. + * @param schemaName The name of the schema containing the views. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + public Observable>> listViewsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listViewsSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listViewsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the views. + ServiceResponse> * @param schemaName The name of the schema containing the views. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlView> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listViewsSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listViews(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listViewsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listViewsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTableStatistics object if successful. + */ + public USqlTableStatistics getTableStatistic(String accountName, String databaseName, String schemaName, String tableName, String statisticsName) { + return getTableStatisticWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, statisticsName).toBlocking().single().body(); + } + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTableStatisticAsync(String accountName, String databaseName, String schemaName, String tableName, String statisticsName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTableStatisticWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, statisticsName), serviceCallback); + } + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableStatistics object + */ + public Observable getTableStatisticAsync(String accountName, String databaseName, String schemaName, String tableName, String statisticsName) { + return getTableStatisticWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, statisticsName).map(new Func1, USqlTableStatistics>() { + @Override + public USqlTableStatistics call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param statisticsName The name of the table statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableStatistics object + */ + public Observable> getTableStatisticWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableName, String statisticsName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (statisticsName == null) { + throw new IllegalArgumentException("Parameter statisticsName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getTableStatistic(databaseName, schemaName, tableName, statisticsName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTableStatisticDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTableStatisticDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableStatistics> object if successful. + */ + public PagedList listTableStatistics(final String accountName, final String databaseName, final String schemaName, final String tableName) { + ServiceResponse> response = listTableStatisticsSinglePageAsync(accountName, databaseName, schemaName, tableName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableStatisticsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableStatisticsSinglePageAsync(accountName, databaseName, schemaName, tableName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableStatisticsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + public Observable> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName) { + return listTableStatisticsWithServiceResponseAsync(accountName, databaseName, schemaName, tableName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + public Observable>> listTableStatisticsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName) { + return listTableStatisticsSinglePageAsync(accountName, databaseName, schemaName, tableName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableStatisticsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableStatistics> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableStatisticsSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String tableName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTableStatistics(databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableStatisticsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableStatistics> object if successful. + */ + public PagedList listTableStatistics(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listTableStatisticsSinglePageAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableStatisticsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableStatisticsSinglePageAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableStatisticsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + public Observable> listTableStatisticsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTableStatisticsWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the statistics. + * @param schemaName The name of the schema containing the statistics. + * @param tableName The name of the table containing the statistics. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + public Observable>> listTableStatisticsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTableStatisticsSinglePageAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableStatisticsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the statistics. + ServiceResponse> * @param schemaName The name of the schema containing the statistics. + ServiceResponse> * @param tableName The name of the table containing the statistics. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableStatistics> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableStatisticsSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTableStatistics(databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableStatisticsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTableStatisticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTablePartition object if successful. + */ + public USqlTablePartition getTablePartition(String accountName, String databaseName, String schemaName, String tableName, String partitionName) { + return getTablePartitionWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, partitionName).toBlocking().single().body(); + } + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTablePartitionAsync(String accountName, String databaseName, String schemaName, String tableName, String partitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTablePartitionWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, partitionName), serviceCallback); + } + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTablePartition object + */ + public Observable getTablePartitionAsync(String accountName, String databaseName, String schemaName, String tableName, String partitionName) { + return getTablePartitionWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, partitionName).map(new Func1, USqlTablePartition>() { + @Override + public USqlTablePartition call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified table partition from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partition. + * @param schemaName The name of the schema containing the partition. + * @param tableName The name of the table containing the partition. + * @param partitionName The name of the table partition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTablePartition object + */ + public Observable> getTablePartitionWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableName, String partitionName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (partitionName == null) { + throw new IllegalArgumentException("Parameter partitionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getTablePartition(databaseName, schemaName, tableName, partitionName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTablePartitionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTablePartitionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTablePartition> object if successful. + */ + public PagedList listTablePartitions(final String accountName, final String databaseName, final String schemaName, final String tableName) { + ServiceResponse> response = listTablePartitionsSinglePageAsync(accountName, databaseName, schemaName, tableName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTablePartitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTablePartitionsSinglePageAsync(accountName, databaseName, schemaName, tableName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTablePartitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + public Observable> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName) { + return listTablePartitionsWithServiceResponseAsync(accountName, databaseName, schemaName, tableName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + public Observable>> listTablePartitionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName) { + return listTablePartitionsSinglePageAsync(accountName, databaseName, schemaName, tableName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTablePartitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTablePartition> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTablePartitionsSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String tableName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTablePartitions(databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTablePartitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTablePartition> object if successful. + */ + public PagedList listTablePartitions(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listTablePartitionsSinglePageAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTablePartitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTablePartitionsSinglePageAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTablePartitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + public Observable> listTablePartitionsAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTablePartitionsWithServiceResponseAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the partitions. + * @param schemaName The name of the schema containing the partitions. + * @param tableName The name of the table containing the partitions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + public Observable>> listTablePartitionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTablePartitionsSinglePageAsync(accountName, databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTablePartitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the partitions. + ServiceResponse> * @param schemaName The name of the schema containing the partitions. + ServiceResponse> * @param tableName The name of the table containing the partitions. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTablePartition> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTablePartitionsSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String tableName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTablePartitions(databaseName, schemaName, tableName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTablePartitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTablePartitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlType> object if successful. + */ + public PagedList listTypes(final String accountName, final String databaseName, final String schemaName) { + ServiceResponse> response = listTypesSinglePageAsync(accountName, databaseName, schemaName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTypesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTypesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTypesSinglePageAsync(accountName, databaseName, schemaName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTypesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + public Observable> listTypesAsync(final String accountName, final String databaseName, final String schemaName) { + return listTypesWithServiceResponseAsync(accountName, databaseName, schemaName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + public Observable>> listTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName) { + return listTypesSinglePageAsync(accountName, databaseName, schemaName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTypesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlType> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTypesSinglePageAsync(final String accountName, final String databaseName, final String schemaName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTypesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlType> object if successful. + */ + public PagedList listTypes(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listTypesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTypesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTypesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTypesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + public Observable> listTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTypesWithServiceResponseAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the types. + * @param schemaName The name of the schema containing the types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + public Observable>> listTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTypesSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTypesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the types. + ServiceResponse> * @param schemaName The name of the schema containing the types. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlType> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTypesSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTypesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTypesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlTableValuedFunction object if successful. + */ + public USqlTableValuedFunction getTableValuedFunction(String accountName, String databaseName, String schemaName, String tableValuedFunctionName) { + return getTableValuedFunctionWithServiceResponseAsync(accountName, databaseName, schemaName, tableValuedFunctionName).toBlocking().single().body(); + } + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTableValuedFunctionAsync(String accountName, String databaseName, String schemaName, String tableValuedFunctionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTableValuedFunctionWithServiceResponseAsync(accountName, databaseName, schemaName, tableValuedFunctionName), serviceCallback); + } + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableValuedFunction object + */ + public Observable getTableValuedFunctionAsync(String accountName, String databaseName, String schemaName, String tableValuedFunctionName) { + return getTableValuedFunctionWithServiceResponseAsync(accountName, databaseName, schemaName, tableValuedFunctionName).map(new Func1, USqlTableValuedFunction>() { + @Override + public USqlTableValuedFunction call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified table valued function from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued function. + * @param schemaName The name of the schema containing the table valued function. + * @param tableValuedFunctionName The name of the tableValuedFunction. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlTableValuedFunction object + */ + public Observable> getTableValuedFunctionWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableValuedFunctionName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableValuedFunctionName == null) { + throw new IllegalArgumentException("Parameter tableValuedFunctionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getTableValuedFunction(databaseName, schemaName, tableValuedFunctionName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTableValuedFunctionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTableValuedFunctionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableValuedFunction> object if successful. + */ + public PagedList listTableValuedFunctions(final String accountName, final String databaseName, final String schemaName) { + ServiceResponse> response = listTableValuedFunctionsSinglePageAsync(accountName, databaseName, schemaName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableValuedFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableValuedFunctionsSinglePageAsync(accountName, databaseName, schemaName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableValuedFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + public Observable> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName) { + return listTableValuedFunctionsWithServiceResponseAsync(accountName, databaseName, schemaName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + public Observable>> listTableValuedFunctionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName) { + return listTableValuedFunctionsSinglePageAsync(accountName, databaseName, schemaName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableValuedFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableValuedFunction> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableValuedFunctionsSinglePageAsync(final String accountName, final String databaseName, final String schemaName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTableValuedFunctions(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableValuedFunctionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableValuedFunction> object if successful. + */ + public PagedList listTableValuedFunctions(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listTableValuedFunctionsSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableValuedFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableValuedFunctionsSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableValuedFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + public Observable> listTableValuedFunctionsAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTableValuedFunctionsWithServiceResponseAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table valued functions. + * @param schemaName The name of the schema containing the table valued functions. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + public Observable>> listTableValuedFunctionsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listTableValuedFunctionsSinglePageAsync(accountName, databaseName, schemaName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableValuedFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the table valued functions. + ServiceResponse> * @param schemaName The name of the schema containing the table valued functions. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableValuedFunction> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableValuedFunctionsSinglePageAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listTableValuedFunctions(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableValuedFunctionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTableValuedFunctionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlAssembly object if successful. + */ + public USqlAssembly getAssembly(String accountName, String databaseName, String assemblyName) { + return getAssemblyWithServiceResponseAsync(accountName, databaseName, assemblyName).toBlocking().single().body(); + } + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAssemblyAsync(String accountName, String databaseName, String assemblyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAssemblyWithServiceResponseAsync(accountName, databaseName, assemblyName), serviceCallback); + } + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlAssembly object + */ + public Observable getAssemblyAsync(String accountName, String databaseName, String assemblyName) { + return getAssemblyWithServiceResponseAsync(accountName, databaseName, assemblyName).map(new Func1, USqlAssembly>() { + @Override + public USqlAssembly call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified assembly from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param assemblyName The name of the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlAssembly object + */ + public Observable> getAssemblyWithServiceResponseAsync(String accountName, String databaseName, String assemblyName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (assemblyName == null) { + throw new IllegalArgumentException("Parameter assemblyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getAssembly(databaseName, assemblyName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAssemblyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAssemblyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlAssemblyClr> object if successful. + */ + public PagedList listAssemblies(final String accountName, final String databaseName) { + ServiceResponse> response = listAssembliesSinglePageAsync(accountName, databaseName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAssembliesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAssembliesAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAssembliesSinglePageAsync(accountName, databaseName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAssembliesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + public Observable> listAssembliesAsync(final String accountName, final String databaseName) { + return listAssembliesWithServiceResponseAsync(accountName, databaseName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + public Observable>> listAssembliesWithServiceResponseAsync(final String accountName, final String databaseName) { + return listAssembliesSinglePageAsync(accountName, databaseName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAssembliesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlAssemblyClr> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAssembliesSinglePageAsync(final String accountName, final String databaseName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listAssemblies(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAssembliesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlAssemblyClr> object if successful. + */ + public PagedList listAssemblies(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listAssembliesSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAssembliesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAssembliesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAssembliesSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAssembliesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + public Observable> listAssembliesAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listAssembliesWithServiceResponseAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the assembly. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + public Observable>> listAssembliesWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listAssembliesSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAssembliesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the assembly. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlAssemblyClr> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAssembliesSinglePageAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listAssemblies(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAssembliesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAssembliesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlSchema object if successful. + */ + public USqlSchema getSchema(String accountName, String databaseName, String schemaName) { + return getSchemaWithServiceResponseAsync(accountName, databaseName, schemaName).toBlocking().single().body(); + } + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getSchemaAsync(String accountName, String databaseName, String schemaName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSchemaWithServiceResponseAsync(accountName, databaseName, schemaName), serviceCallback); + } + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSchema object + */ + public Observable getSchemaAsync(String accountName, String databaseName, String schemaName) { + return getSchemaWithServiceResponseAsync(accountName, databaseName, schemaName).map(new Func1, USqlSchema>() { + @Override + public USqlSchema call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified schema from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlSchema object + */ + public Observable> getSchemaWithServiceResponseAsync(String accountName, String databaseName, String schemaName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getSchema(databaseName, schemaName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSchemaDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSchemaDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlSchema> object if successful. + */ + public PagedList listSchemas(final String accountName, final String databaseName) { + ServiceResponse> response = listSchemasSinglePageAsync(accountName, databaseName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSchemasNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSchemasAsync(final String accountName, final String databaseName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSchemasSinglePageAsync(accountName, databaseName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSchemasNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + public Observable> listSchemasAsync(final String accountName, final String databaseName) { + return listSchemasWithServiceResponseAsync(accountName, databaseName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + public Observable>> listSchemasWithServiceResponseAsync(final String accountName, final String databaseName) { + return listSchemasSinglePageAsync(accountName, databaseName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSchemasNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlSchema> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSchemasSinglePageAsync(final String accountName, final String databaseName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listSchemas(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSchemasDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlSchema> object if successful. + */ + public PagedList listSchemas(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listSchemasSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSchemasNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSchemasAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSchemasSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSchemasNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + public Observable> listSchemasAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listSchemasWithServiceResponseAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the schema. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + public Observable>> listSchemasWithServiceResponseAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listSchemasSinglePageAsync(accountName, databaseName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSchemasNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param databaseName The name of the database containing the schema. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlSchema> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSchemasSinglePageAsync(final String accountName, final String databaseName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listSchemas(databaseName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSchemasDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSchemasDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the USqlDatabase object if successful. + */ + public USqlDatabase getDatabase(String accountName, String databaseName) { + return getDatabaseWithServiceResponseAsync(accountName, databaseName).toBlocking().single().body(); + } + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDatabaseAsync(String accountName, String databaseName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDatabaseWithServiceResponseAsync(accountName, databaseName), serviceCallback); + } + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlDatabase object + */ + public Observable getDatabaseAsync(String accountName, String databaseName) { + return getDatabaseWithServiceResponseAsync(accountName, databaseName).map(new Func1, USqlDatabase>() { + @Override + public USqlDatabase call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the specified database from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the USqlDatabase object + */ + public Observable> getDatabaseWithServiceResponseAsync(String accountName, String databaseName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.getDatabase(databaseName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDatabaseDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlDatabase> object if successful. + */ + public PagedList listDatabases(final String accountName) { + ServiceResponse> response = listDatabasesSinglePageAsync(accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDatabasesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDatabasesAsync(final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDatabasesSinglePageAsync(accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDatabasesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + public Observable> listDatabasesAsync(final String accountName) { + return listDatabasesWithServiceResponseAsync(accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + public Observable>> listDatabasesWithServiceResponseAsync(final String accountName) { + return listDatabasesSinglePageAsync(accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDatabasesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlDatabase> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDatabasesSinglePageAsync(final String accountName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listDatabases(filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDatabasesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlDatabase> object if successful. + */ + public PagedList listDatabases(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listDatabasesSinglePageAsync(accountName, filter, top, skip, expand, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDatabasesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDatabasesAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDatabasesSinglePageAsync(accountName, filter, top, skip, expand, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDatabasesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + public Observable> listDatabasesAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listDatabasesWithServiceResponseAsync(accountName, filter, top, skip, expand, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + public Observable>> listDatabasesWithServiceResponseAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + return listDatabasesSinglePageAsync(accountName, filter, top, skip, expand, select, orderby, count) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDatabasesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlDatabase> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDatabasesSinglePageAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + return service.listDatabases(filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDatabasesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDatabasesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlExternalDataSource> object if successful. + */ + public PagedList listExternalDataSourcesNext(final String nextPageLink) { + ServiceResponse> response = listExternalDataSourcesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExternalDataSourcesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listExternalDataSourcesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExternalDataSourcesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExternalDataSourcesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + public Observable> listExternalDataSourcesNextAsync(final String nextPageLink) { + return listExternalDataSourcesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlExternalDataSource> object + */ + public Observable>> listExternalDataSourcesNextWithServiceResponseAsync(final String nextPageLink) { + return listExternalDataSourcesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listExternalDataSourcesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of external data sources from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlExternalDataSource> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExternalDataSourcesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listExternalDataSourcesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExternalDataSourcesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExternalDataSourcesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlCredential> object if successful. + */ + public PagedList listCredentialsNext(final String nextPageLink) { + ServiceResponse> response = listCredentialsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listCredentialsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCredentialsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listCredentialsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCredentialsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + public Observable> listCredentialsNextAsync(final String nextPageLink) { + return listCredentialsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlCredential> object + */ + public Observable>> listCredentialsNextWithServiceResponseAsync(final String nextPageLink) { + return listCredentialsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCredentialsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of credentials from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlCredential> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listCredentialsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listCredentialsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCredentialsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlProcedure> object if successful. + */ + public PagedList listProceduresNext(final String nextPageLink) { + ServiceResponse> response = listProceduresNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listProceduresNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listProceduresNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listProceduresNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listProceduresNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + public Observable> listProceduresNextAsync(final String nextPageLink) { + return listProceduresNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlProcedure> object + */ + public Observable>> listProceduresNextWithServiceResponseAsync(final String nextPageLink) { + return listProceduresNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listProceduresNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of procedures from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlProcedure> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listProceduresNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listProceduresNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProceduresNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProceduresNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTable> object if successful. + */ + public PagedList listTablesNext(final String nextPageLink) { + ServiceResponse> response = listTablesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTablesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTablesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTablesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTablesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + public Observable> listTablesNextAsync(final String nextPageLink) { + return listTablesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTable> object + */ + public Observable>> listTablesNextWithServiceResponseAsync(final String nextPageLink) { + return listTablesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTablesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of tables from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTable> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTablesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTablesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTablesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTablesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableType> object if successful. + */ + public PagedList listTableTypesNext(final String nextPageLink) { + ServiceResponse> response = listTableTypesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableTypesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableTypesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableTypesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableTypesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + public Observable> listTableTypesNextAsync(final String nextPageLink) { + return listTableTypesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableType> object + */ + public Observable>> listTableTypesNextWithServiceResponseAsync(final String nextPageLink) { + return listTableTypesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableTypesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableTypesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTableTypesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableTypesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTableTypesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlView> object if successful. + */ + public PagedList listViewsNext(final String nextPageLink) { + ServiceResponse> response = listViewsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listViewsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listViewsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listViewsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listViewsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + public Observable> listViewsNextAsync(final String nextPageLink) { + return listViewsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlView> object + */ + public Observable>> listViewsNextWithServiceResponseAsync(final String nextPageLink) { + return listViewsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listViewsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of views from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlView> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listViewsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listViewsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listViewsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listViewsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableStatistics> object if successful. + */ + public PagedList listTableStatisticsNext(final String nextPageLink) { + ServiceResponse> response = listTableStatisticsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableStatisticsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableStatisticsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableStatisticsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableStatisticsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + public Observable> listTableStatisticsNextAsync(final String nextPageLink) { + return listTableStatisticsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableStatistics> object + */ + public Observable>> listTableStatisticsNextWithServiceResponseAsync(final String nextPageLink) { + return listTableStatisticsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableStatisticsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table statistics from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableStatistics> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableStatisticsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTableStatisticsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableStatisticsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTableStatisticsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTablePartition> object if successful. + */ + public PagedList listTablePartitionsNext(final String nextPageLink) { + ServiceResponse> response = listTablePartitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTablePartitionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTablePartitionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTablePartitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTablePartitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + public Observable> listTablePartitionsNextAsync(final String nextPageLink) { + return listTablePartitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTablePartition> object + */ + public Observable>> listTablePartitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listTablePartitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTablePartitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table partitions from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTablePartition> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTablePartitionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTablePartitionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTablePartitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTablePartitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlType> object if successful. + */ + public PagedList listTypesNext(final String nextPageLink) { + ServiceResponse> response = listTypesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTypesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTypesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTypesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTypesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + public Observable> listTypesNextAsync(final String nextPageLink) { + return listTypesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlType> object + */ + public Observable>> listTypesNextWithServiceResponseAsync(final String nextPageLink) { + return listTypesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTypesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlType> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTypesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTypesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTypesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTypesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlTableValuedFunction> object if successful. + */ + public PagedList listTableValuedFunctionsNext(final String nextPageLink) { + ServiceResponse> response = listTableValuedFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listTableValuedFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listTableValuedFunctionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listTableValuedFunctionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listTableValuedFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + public Observable> listTableValuedFunctionsNextAsync(final String nextPageLink) { + return listTableValuedFunctionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlTableValuedFunction> object + */ + public Observable>> listTableValuedFunctionsNextWithServiceResponseAsync(final String nextPageLink) { + return listTableValuedFunctionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listTableValuedFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of table valued functions from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlTableValuedFunction> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listTableValuedFunctionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listTableValuedFunctionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTableValuedFunctionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTableValuedFunctionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlAssemblyClr> object if successful. + */ + public PagedList listAssembliesNext(final String nextPageLink) { + ServiceResponse> response = listAssembliesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAssembliesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAssembliesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAssembliesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAssembliesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + public Observable> listAssembliesNextAsync(final String nextPageLink) { + return listAssembliesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlAssemblyClr> object + */ + public Observable>> listAssembliesNextWithServiceResponseAsync(final String nextPageLink) { + return listAssembliesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAssembliesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of assemblies from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlAssemblyClr> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAssembliesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listAssembliesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAssembliesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAssembliesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlSchema> object if successful. + */ + public PagedList listSchemasNext(final String nextPageLink) { + ServiceResponse> response = listSchemasNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSchemasNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSchemasNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSchemasNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSchemasNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + public Observable> listSchemasNextAsync(final String nextPageLink) { + return listSchemasNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlSchema> object + */ + public Observable>> listSchemasNextWithServiceResponseAsync(final String nextPageLink) { + return listSchemasNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSchemasNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of schemas from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlSchema> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSchemasNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSchemasNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSchemasNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSchemasNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<USqlDatabase> object if successful. + */ + public PagedList listDatabasesNext(final String nextPageLink) { + ServiceResponse> response = listDatabasesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDatabasesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listDatabasesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDatabasesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDatabasesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + public Observable> listDatabasesNextAsync(final String nextPageLink) { + return listDatabasesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<USqlDatabase> object + */ + public Observable>> listDatabasesNextWithServiceResponseAsync(final String nextPageLink) { + return listDatabasesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDatabasesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Retrieves the list of databases from the Data Lake Analytics catalog. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<USqlDatabase> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDatabasesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listDatabasesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDatabasesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDatabasesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java new file mode 100644 index 000000000000..c2e4a2ddb6fe --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.datalake.analytics.Catalogs; +import com.microsoft.azure.datalake.analytics.DataLakeAnalyticsCatalogManagementClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataLakeAnalyticsCatalogManagementClientImpl class. + */ +public class DataLakeAnalyticsCatalogManagementClientImpl extends AzureServiceClient implements DataLakeAnalyticsCatalogManagementClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Gets the DNS suffix used as the base for all Azure Data Lake Analytics Catalog service requests. */ + private String adlaCatalogDnsSuffix; + + /** + * Gets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Catalog service requests. + * + * @return the adlaCatalogDnsSuffix value. + */ + public String adlaCatalogDnsSuffix() { + return this.adlaCatalogDnsSuffix; + } + + /** + * Sets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Catalog service requests. + * + * @param adlaCatalogDnsSuffix the adlaCatalogDnsSuffix value. + * @return the service client itself + */ + public DataLakeAnalyticsCatalogManagementClientImpl withAdlaCatalogDnsSuffix(String adlaCatalogDnsSuffix) { + this.adlaCatalogDnsSuffix = adlaCatalogDnsSuffix; + return this; + } + + /** Gets or sets the preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets Gets or sets the preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets Gets or sets the preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataLakeAnalyticsCatalogManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public DataLakeAnalyticsCatalogManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public DataLakeAnalyticsCatalogManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The Catalogs object to access its operations. + */ + private Catalogs catalogs; + + /** + * Gets the Catalogs object to access its operations. + * @return the Catalogs object. + */ + public Catalogs catalogs() { + return this.catalogs; + } + + /** + * Initializes an instance of DataLakeAnalyticsCatalogManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public DataLakeAnalyticsCatalogManagementClientImpl(ServiceClientCredentials credentials) { + this("https://{accountName}.{adlaCatalogDnsSuffix}", credentials); + } + + /** + * Initializes an instance of DataLakeAnalyticsCatalogManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + private DataLakeAnalyticsCatalogManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataLakeAnalyticsCatalogManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataLakeAnalyticsCatalogManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2015-10-01-preview"; + this.adlaCatalogDnsSuffix = "azuredatalakeanalytics.net"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.catalogs = new CatalogsImpl(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s)", super.userAgent(), "DataLakeAnalyticsCatalogManagementClient", "2015-10-01-preview"); + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java new file mode 100644 index 000000000000..677dae2b082c --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.datalake.analytics.DataLakeAnalyticsJobManagementClient; +import com.microsoft.azure.datalake.analytics.Jobs; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataLakeAnalyticsJobManagementClientImpl class. + */ +public class DataLakeAnalyticsJobManagementClientImpl extends AzureServiceClient implements DataLakeAnalyticsJobManagementClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Gets the DNS suffix used as the base for all Azure Data Lake Analytics Job service requests. */ + private String adlaJobDnsSuffix; + + /** + * Gets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Job service requests. + * + * @return the adlaJobDnsSuffix value. + */ + public String adlaJobDnsSuffix() { + return this.adlaJobDnsSuffix; + } + + /** + * Sets Gets the DNS suffix used as the base for all Azure Data Lake Analytics Job service requests. + * + * @param adlaJobDnsSuffix the adlaJobDnsSuffix value. + * @return the service client itself + */ + public DataLakeAnalyticsJobManagementClientImpl withAdlaJobDnsSuffix(String adlaJobDnsSuffix) { + this.adlaJobDnsSuffix = adlaJobDnsSuffix; + return this; + } + + /** Gets or sets the preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets Gets or sets the preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets Gets or sets the preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataLakeAnalyticsJobManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public DataLakeAnalyticsJobManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public DataLakeAnalyticsJobManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The Jobs object to access its operations. + */ + private Jobs jobs; + + /** + * Gets the Jobs object to access its operations. + * @return the Jobs object. + */ + public Jobs jobs() { + return this.jobs; + } + + /** + * Initializes an instance of DataLakeAnalyticsJobManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public DataLakeAnalyticsJobManagementClientImpl(ServiceClientCredentials credentials) { + this("https://{accountName}.{adlaJobDnsSuffix}", credentials); + } + + /** + * Initializes an instance of DataLakeAnalyticsJobManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + private DataLakeAnalyticsJobManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataLakeAnalyticsJobManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataLakeAnalyticsJobManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2015-11-01-preview"; + this.adlaJobDnsSuffix = "azuredatalakeanalytics.net"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.jobs = new JobsImpl(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s)", super.userAgent(), "DataLakeAnalyticsJobManagementClient", "2015-11-01-preview"); + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/JobsImpl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/JobsImpl.java new file mode 100644 index 000000000000..59adf78b1ec6 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/JobsImpl.java @@ -0,0 +1,1025 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.datalake.analytics.Jobs; +import com.google.common.base.Joiner; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.JobDataPath; +import com.microsoft.azure.datalake.analytics.models.JobInformation; +import com.microsoft.azure.datalake.analytics.models.JobStatistics; +import com.microsoft.azure.datalake.analytics.models.PageImpl; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Jobs. + */ +public class JobsImpl implements Jobs { + /** The Retrofit service to perform REST calls. */ + private JobsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsJobManagementClientImpl client; + + /** + * Initializes an instance of JobsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public JobsImpl(Retrofit retrofit, DataLakeAnalyticsJobManagementClientImpl client) { + this.service = retrofit.create(JobsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Jobs to be + * used by Retrofit to perform actually REST calls. + */ + interface JobsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs getStatistics" }) + @POST("Jobs/{jobIdentity}/GetStatistics") + Observable> getStatistics(@Path("jobIdentity") UUID jobIdentity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs getDebugDataPath" }) + @POST("Jobs/{jobIdentity}/GetDebugDataPath") + Observable> getDebugDataPath(@Path("jobIdentity") UUID jobIdentity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs build" }) + @POST("BuildJob") + Observable> build(@Body JobInformation parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs cancel" }) + @POST("Jobs/{jobIdentity}/CancelJob") + Observable> cancel(@Path("jobIdentity") UUID jobIdentity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs get" }) + @GET("Jobs/{jobIdentity}") + Observable> get(@Path("jobIdentity") UUID jobIdentity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs create" }) + @PUT("Jobs/{jobIdentity}") + Observable> create(@Path("jobIdentity") UUID jobIdentity, @Body JobInformation parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs list" }) + @GET("Jobs") + Observable> list(@Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("$search") String search, @Query("$format") String format, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Jobs listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobStatistics object if successful. + */ + public JobStatistics getStatistics(String accountName, UUID jobIdentity) { + return getStatisticsWithServiceResponseAsync(accountName, jobIdentity).toBlocking().single().body(); + } + + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getStatisticsAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getStatisticsWithServiceResponseAsync(accountName, jobIdentity), serviceCallback); + } + + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobStatistics object + */ + public Observable getStatisticsAsync(String accountName, UUID jobIdentity) { + return getStatisticsWithServiceResponseAsync(accountName, jobIdentity).map(new Func1, JobStatistics>() { + @Override + public JobStatistics call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets statistics of the specified job. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobStatistics object + */ + public Observable> getStatisticsWithServiceResponseAsync(String accountName, UUID jobIdentity) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (jobIdentity == null) { + throw new IllegalArgumentException("Parameter jobIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.getStatistics(jobIdentity, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getStatisticsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getStatisticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobDataPath object if successful. + */ + public JobDataPath getDebugDataPath(String accountName, UUID jobIdentity) { + return getDebugDataPathWithServiceResponseAsync(accountName, jobIdentity).toBlocking().single().body(); + } + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDebugDataPathAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDebugDataPathWithServiceResponseAsync(accountName, jobIdentity), serviceCallback); + } + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobDataPath object + */ + public Observable getDebugDataPathAsync(String accountName, UUID jobIdentity) { + return getDebugDataPathWithServiceResponseAsync(accountName, jobIdentity).map(new Func1, JobDataPath>() { + @Override + public JobDataPath call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the U-SQL job debug data information specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobDataPath object + */ + public Observable> getDebugDataPathWithServiceResponseAsync(String accountName, UUID jobIdentity) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (jobIdentity == null) { + throw new IllegalArgumentException("Parameter jobIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.getDebugDataPath(jobIdentity, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDebugDataPathDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDebugDataPathDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInformation object if successful. + */ + public JobInformation build(String accountName, JobInformation parameters) { + return buildWithServiceResponseAsync(accountName, parameters).toBlocking().single().body(); + } + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture buildAsync(String accountName, JobInformation parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(buildWithServiceResponseAsync(accountName, parameters), serviceCallback); + } + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + public Observable buildAsync(String accountName, JobInformation parameters) { + return buildWithServiceResponseAsync(accountName, parameters).map(new Func1, JobInformation>() { + @Override + public JobInformation call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param parameters The parameters to build a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + public Observable> buildWithServiceResponseAsync(String accountName, JobInformation parameters) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.build(parameters, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = buildDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse buildDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void cancel(String accountName, UUID jobIdentity) { + cancelWithServiceResponseAsync(accountName, jobIdentity).toBlocking().single().body(); + } + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture cancelAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(accountName, jobIdentity), serviceCallback); + } + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable cancelAsync(String accountName, UUID jobIdentity) { + return cancelWithServiceResponseAsync(accountName, jobIdentity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Cancels the running job specified by the job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID to cancel. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> cancelWithServiceResponseAsync(String accountName, UUID jobIdentity) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (jobIdentity == null) { + throw new IllegalArgumentException("Parameter jobIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.cancel(jobIdentity, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = cancelDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse cancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInformation object if successful. + */ + public JobInformation get(String accountName, UUID jobIdentity) { + return getWithServiceResponseAsync(accountName, jobIdentity).toBlocking().single().body(); + } + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String accountName, UUID jobIdentity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(accountName, jobIdentity), serviceCallback); + } + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + public Observable getAsync(String accountName, UUID jobIdentity) { + return getWithServiceResponseAsync(accountName, jobIdentity).map(new Func1, JobInformation>() { + @Override + public JobInformation call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the job information for the specified job ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity JobInfo ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + public Observable> getWithServiceResponseAsync(String accountName, UUID jobIdentity) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (jobIdentity == null) { + throw new IllegalArgumentException("Parameter jobIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.get(jobIdentity, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobInformation object if successful. + */ + public JobInformation create(String accountName, UUID jobIdentity, JobInformation parameters) { + return createWithServiceResponseAsync(accountName, jobIdentity, parameters).toBlocking().single().body(); + } + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String accountName, UUID jobIdentity, JobInformation parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(accountName, jobIdentity, parameters), serviceCallback); + } + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + public Observable createAsync(String accountName, UUID jobIdentity, JobInformation parameters) { + return createWithServiceResponseAsync(accountName, jobIdentity, parameters).map(new Func1, JobInformation>() { + @Override + public JobInformation call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Submits a job to the specified Data Lake Analytics account. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param jobIdentity The job ID (a GUID) for the job being submitted. + * @param parameters The parameters to submit a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobInformation object + */ + public Observable> createWithServiceResponseAsync(String accountName, UUID jobIdentity, JobInformation parameters) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (jobIdentity == null) { + throw new IllegalArgumentException("Parameter jobIdentity is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.create(jobIdentity, parameters, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInformation> object if successful. + */ + public PagedList list(final String accountName) { + ServiceResponse> response = listSinglePageAsync(accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + public Observable> listAsync(final String accountName) { + return listWithServiceResponseAsync(accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + public Observable>> listWithServiceResponseAsync(final String accountName) { + return listSinglePageAsync(accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String accountName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + final String search = null; + final String format = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.list(filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInformation> object if successful. + */ + public PagedList list(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format) { + ServiceResponse> response = listSinglePageAsync(accountName, filter, top, skip, expand, select, orderby, count, search, format).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(accountName, filter, top, skip, expand, select, orderby, count, search, format), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + public Observable> listAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format) { + return listWithServiceResponseAsync(accountName, filter, top, skip, expand, select, orderby, count, search, format) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + public Observable>> listWithServiceResponseAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format) { + return listSinglePageAsync(accountName, filter, top, skip, expand, select, orderby, count, search, format) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute job operations on. + ServiceResponse> * @param filter OData filter. Optional. + ServiceResponse> * @param top The number of items to return. Optional. + ServiceResponse> * @param skip The number of items to skip over before returning elements. Optional. + ServiceResponse> * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. + ServiceResponse> * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + ServiceResponse> * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + ServiceResponse> * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + ServiceResponse> * @param search A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. + ServiceResponse> * @param format The return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String accountName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final String search, final String format) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.list(filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobInformation> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobInformation> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/PipelinesImpl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/PipelinesImpl.java new file mode 100644 index 000000000000..2c383d42c05f --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/PipelinesImpl.java @@ -0,0 +1,605 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.datalake.analytics.Pipelines; +import com.google.common.base.Joiner; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.JobPipelineInformation; +import com.microsoft.azure.datalake.analytics.models.PageImpl; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import okhttp3.ResponseBody; +import org.joda.time.DateTime; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Pipelines. + */ +public class PipelinesImpl implements Pipelines { + /** The Retrofit service to perform REST calls. */ + private PipelinesService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsJobManagementClientImpl client; + + /** + * Initializes an instance of PipelinesImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PipelinesImpl(Retrofit retrofit, DataLakeAnalyticsJobManagementClientImpl client) { + this.service = retrofit.create(PipelinesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Pipelines to be + * used by Retrofit to perform actually REST calls. + */ + interface PipelinesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Pipelines list" }) + @GET("pipelines") + Observable> list(@Query("startDateTime") DateTime startDateTime, @Query("endDateTime") DateTime endDateTime, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Pipelines get" }) + @GET("pipelines/{pipelineIdentity}") + Observable> get(@Path("pipelineIdentity") UUID pipelineIdentity, @Query("startDateTime") DateTime startDateTime, @Query("endDateTime") DateTime endDateTime, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Pipelines listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobPipelineInformation> object if successful. + */ + public PagedList list(final String accountName) { + ServiceResponse> response = listSinglePageAsync(accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + public Observable> listAsync(final String accountName) { + return listWithServiceResponseAsync(accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + public Observable>> listWithServiceResponseAsync(final String accountName) { + return listSinglePageAsync(accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobPipelineInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String accountName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final DateTime startDateTime = null; + final DateTime endDateTime = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.list(startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobPipelineInformation> object if successful. + */ + public PagedList list(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + ServiceResponse> response = listSinglePageAsync(accountName, startDateTime, endDateTime).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(accountName, startDateTime, endDateTime), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + public Observable> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + return listWithServiceResponseAsync(accountName, startDateTime, endDateTime) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all pipelines. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + public Observable>> listWithServiceResponseAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + return listSinglePageAsync(accountName, startDateTime, endDateTime) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all pipelines. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute job operations on. + ServiceResponse> * @param startDateTime The start date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + ServiceResponse> * @param endDateTime The end date for when to get the list of pipelines. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobPipelineInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.list(startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobPipelineInformation object if successful. + */ + public JobPipelineInformation get(String accountName, UUID pipelineIdentity) { + return getWithServiceResponseAsync(accountName, pipelineIdentity).toBlocking().single().body(); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String accountName, UUID pipelineIdentity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(accountName, pipelineIdentity), serviceCallback); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + public Observable getAsync(String accountName, UUID pipelineIdentity) { + return getWithServiceResponseAsync(accountName, pipelineIdentity).map(new Func1, JobPipelineInformation>() { + @Override + public JobPipelineInformation call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + public Observable> getWithServiceResponseAsync(String accountName, UUID pipelineIdentity) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (pipelineIdentity == null) { + throw new IllegalArgumentException("Parameter pipelineIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final DateTime startDateTime = null; + final DateTime endDateTime = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.get(pipelineIdentity, startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobPipelineInformation object if successful. + */ + public JobPipelineInformation get(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime) { + return getWithServiceResponseAsync(accountName, pipelineIdentity, startDateTime, endDateTime).toBlocking().single().body(); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(accountName, pipelineIdentity, startDateTime, endDateTime), serviceCallback); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + public Observable getAsync(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime) { + return getWithServiceResponseAsync(accountName, pipelineIdentity, startDateTime, endDateTime).map(new Func1, JobPipelineInformation>() { + @Override + public JobPipelineInformation call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Pipeline information for the specified pipeline ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param pipelineIdentity Pipeline ID. + * @param startDateTime The start date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the pipeline and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobPipelineInformation object + */ + public Observable> getWithServiceResponseAsync(String accountName, UUID pipelineIdentity, DateTime startDateTime, DateTime endDateTime) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (pipelineIdentity == null) { + throw new IllegalArgumentException("Parameter pipelineIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.get(pipelineIdentity, startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobPipelineInformation> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all pipelines. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobPipelineInformation> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all pipelines. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobPipelineInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/RecurrencesImpl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/RecurrencesImpl.java new file mode 100644 index 000000000000..000428f4304d --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/RecurrencesImpl.java @@ -0,0 +1,605 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.datalake.analytics.Recurrences; +import com.google.common.base.Joiner; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.datalake.analytics.models.JobRecurrenceInformation; +import com.microsoft.azure.datalake.analytics.models.PageImpl; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import okhttp3.ResponseBody; +import org.joda.time.DateTime; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Recurrences. + */ +public class RecurrencesImpl implements Recurrences { + /** The Retrofit service to perform REST calls. */ + private RecurrencesService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsJobManagementClientImpl client; + + /** + * Initializes an instance of RecurrencesImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RecurrencesImpl(Retrofit retrofit, DataLakeAnalyticsJobManagementClientImpl client) { + this.service = retrofit.create(RecurrencesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Recurrences to be + * used by Retrofit to perform actually REST calls. + */ + interface RecurrencesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Recurrences list" }) + @GET("recurrences") + Observable> list(@Query("startDateTime") DateTime startDateTime, @Query("endDateTime") DateTime endDateTime, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Recurrences get" }) + @GET("recurrences/{recurrenceIdentity}") + Observable> get(@Path("recurrenceIdentity") UUID recurrenceIdentity, @Query("startDateTime") DateTime startDateTime, @Query("endDateTime") DateTime endDateTime, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.datalake.analytics.Recurrences listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobRecurrenceInformation> object if successful. + */ + public PagedList list(final String accountName) { + ServiceResponse> response = listSinglePageAsync(accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + public Observable> listAsync(final String accountName) { + return listWithServiceResponseAsync(accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + public Observable>> listWithServiceResponseAsync(final String accountName) { + return listSinglePageAsync(accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobRecurrenceInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String accountName) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final DateTime startDateTime = null; + final DateTime endDateTime = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.list(startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobRecurrenceInformation> object if successful. + */ + public PagedList list(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + ServiceResponse> response = listSinglePageAsync(accountName, startDateTime, endDateTime).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(accountName, startDateTime, endDateTime), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + public Observable> listAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + return listWithServiceResponseAsync(accountName, startDateTime, endDateTime) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all recurrences. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + public Observable>> listWithServiceResponseAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + return listSinglePageAsync(accountName, startDateTime, endDateTime) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all recurrences. + * + ServiceResponse> * @param accountName The Azure Data Lake Analytics account to execute job operations on. + ServiceResponse> * @param startDateTime The start date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + ServiceResponse> * @param endDateTime The end date for when to get the list of recurrences. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobRecurrenceInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String accountName, final DateTime startDateTime, final DateTime endDateTime) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.list(startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobRecurrenceInformation object if successful. + */ + public JobRecurrenceInformation get(String accountName, UUID recurrenceIdentity) { + return getWithServiceResponseAsync(accountName, recurrenceIdentity).toBlocking().single().body(); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String accountName, UUID recurrenceIdentity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(accountName, recurrenceIdentity), serviceCallback); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + public Observable getAsync(String accountName, UUID recurrenceIdentity) { + return getWithServiceResponseAsync(accountName, recurrenceIdentity).map(new Func1, JobRecurrenceInformation>() { + @Override + public JobRecurrenceInformation call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + public Observable> getWithServiceResponseAsync(String accountName, UUID recurrenceIdentity) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (recurrenceIdentity == null) { + throw new IllegalArgumentException("Parameter recurrenceIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final DateTime startDateTime = null; + final DateTime endDateTime = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.get(recurrenceIdentity, startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobRecurrenceInformation object if successful. + */ + public JobRecurrenceInformation get(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime) { + return getWithServiceResponseAsync(accountName, recurrenceIdentity, startDateTime, endDateTime).toBlocking().single().body(); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(accountName, recurrenceIdentity, startDateTime, endDateTime), serviceCallback); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + public Observable getAsync(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime) { + return getWithServiceResponseAsync(accountName, recurrenceIdentity, startDateTime, endDateTime).map(new Func1, JobRecurrenceInformation>() { + @Override + public JobRecurrenceInformation call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the recurrence information for the specified recurrence ID. + * + * @param accountName The Azure Data Lake Analytics account to execute job operations on. + * @param recurrenceIdentity Recurrence ID. + * @param startDateTime The start date for when to get the recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @param endDateTime The end date for when to get recurrence and aggregate its data. The startDateTime and endDateTime can be no more than 30 days apart. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobRecurrenceInformation object + */ + public Observable> getWithServiceResponseAsync(String accountName, UUID recurrenceIdentity, DateTime startDateTime, DateTime endDateTime) { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaJobDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaJobDnsSuffix() is required and cannot be null."); + } + if (recurrenceIdentity == null) { + throw new IllegalArgumentException("Parameter recurrenceIdentity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaJobDnsSuffix}", this.client.adlaJobDnsSuffix()); + return service.get(recurrenceIdentity, startDateTime, endDateTime, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobRecurrenceInformation> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all recurrences. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobRecurrenceInformation> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all recurrences. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobRecurrenceInformation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/package-info.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/package-info.java new file mode 100644 index 000000000000..7e8a41d78923 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for DataLakeAnalyticsCatalogManagementClient. + * Creates an Azure Data Lake Analytics catalog client. + */ +package com.microsoft.azure.datalake.analytics.implementation; diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Acl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Acl.java new file mode 100644 index 000000000000..10d750714191 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Acl.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog access control list (ACL) entry. + */ +public class Acl { + /** + * the access control list (ACL) entry type. UserObj and GroupObj denote + * the owning user and group, respectively. Possible values include: + * 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + */ + @JsonProperty(value = "aceType", access = JsonProperty.Access.WRITE_ONLY) + private AclType aceType; + + /** + * the Azure AD object ID of the user or group being specified in the + * access control list (ACL) entry. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /** + * the permission type of the access control list (ACL) entry. Possible + * values include: 'None', 'Use', 'Create', 'Drop', 'Alter', 'Write', + * 'All'. + */ + @JsonProperty(value = "permission", access = JsonProperty.Access.WRITE_ONLY) + private PermissionType permission; + + /** + * Get the access control list (ACL) entry type. UserObj and GroupObj denote the owning user and group, respectively. Possible values include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + * + * @return the aceType value + */ + public AclType aceType() { + return this.aceType; + } + + /** + * Get the Azure AD object ID of the user or group being specified in the access control list (ACL) entry. + * + * @return the principalId value + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the permission type of the access control list (ACL) entry. Possible values include: 'None', 'Use', 'Create', 'Drop', 'Alter', 'Write', 'All'. + * + * @return the permission value + */ + public PermissionType permission() { + return this.permission; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclCreateOrUpdateParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclCreateOrUpdateParameters.java new file mode 100644 index 000000000000..d6993107ffc6 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclCreateOrUpdateParameters.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters used to create or update an access control list (ACL) entry. + */ +public class AclCreateOrUpdateParameters { + /** + * the access control list (ACL) entry type. UserObj and GroupObj denote + * the owning user and group, respectively. Possible values include: + * 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + */ + @JsonProperty(value = "aceType", required = true) + private AclType aceType; + + /** + * the Azure AD object ID of the user or group being specified in the + * access control list (ACL) entry. + */ + @JsonProperty(value = "principalId", required = true) + private UUID principalId; + + /** + * the permission type of the access control list (ACL) entry. Possible + * values include: 'None', 'Use', 'Create', 'Drop', 'Alter', 'Write', + * 'All'. + */ + @JsonProperty(value = "permission", required = true) + private PermissionType permission; + + /** + * Get the access control list (ACL) entry type. UserObj and GroupObj denote the owning user and group, respectively. Possible values include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + * + * @return the aceType value + */ + public AclType aceType() { + return this.aceType; + } + + /** + * Set the access control list (ACL) entry type. UserObj and GroupObj denote the owning user and group, respectively. Possible values include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + * + * @param aceType the aceType value to set + * @return the AclCreateOrUpdateParameters object itself. + */ + public AclCreateOrUpdateParameters withAceType(AclType aceType) { + this.aceType = aceType; + return this; + } + + /** + * Get the Azure AD object ID of the user or group being specified in the access control list (ACL) entry. + * + * @return the principalId value + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Set the Azure AD object ID of the user or group being specified in the access control list (ACL) entry. + * + * @param principalId the principalId value to set + * @return the AclCreateOrUpdateParameters object itself. + */ + public AclCreateOrUpdateParameters withPrincipalId(UUID principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the permission type of the access control list (ACL) entry. Possible values include: 'None', 'Use', 'Create', 'Drop', 'Alter', 'Write', 'All'. + * + * @return the permission value + */ + public PermissionType permission() { + return this.permission; + } + + /** + * Set the permission type of the access control list (ACL) entry. Possible values include: 'None', 'Use', 'Create', 'Drop', 'Alter', 'Write', 'All'. + * + * @param permission the permission value to set + * @return the AclCreateOrUpdateParameters object itself. + */ + public AclCreateOrUpdateParameters withPermission(PermissionType permission) { + this.permission = permission; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclDeleteParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclDeleteParameters.java new file mode 100644 index 000000000000..d76ce890c41f --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclDeleteParameters.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters used to delete an access control list (ACL) entry. + */ +public class AclDeleteParameters { + /** + * the access control list (ACL) entry type. UserObj and GroupObj denote + * the owning user and group, respectively. Possible values include: + * 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + */ + @JsonProperty(value = "aceType", required = true) + private AclType aceType; + + /** + * the Azure AD object ID of the user or group being specified in the + * access control list (ACL) entry. + */ + @JsonProperty(value = "principalId", required = true) + private UUID principalId; + + /** + * Get the access control list (ACL) entry type. UserObj and GroupObj denote the owning user and group, respectively. Possible values include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + * + * @return the aceType value + */ + public AclType aceType() { + return this.aceType; + } + + /** + * Set the access control list (ACL) entry type. UserObj and GroupObj denote the owning user and group, respectively. Possible values include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group'. + * + * @param aceType the aceType value to set + * @return the AclDeleteParameters object itself. + */ + public AclDeleteParameters withAceType(AclType aceType) { + this.aceType = aceType; + return this; + } + + /** + * Get the Azure AD object ID of the user or group being specified in the access control list (ACL) entry. + * + * @return the principalId value + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Set the Azure AD object ID of the user or group being specified in the access control list (ACL) entry. + * + * @param principalId the principalId value to set + * @return the AclDeleteParameters object itself. + */ + public AclDeleteParameters withPrincipalId(UUID principalId) { + this.principalId = principalId; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclType.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclType.java new file mode 100644 index 000000000000..5cf894cf838c --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/AclType.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AclType. + */ +public final class AclType extends ExpandableStringEnum { + /** Static value UserObj for AclType. */ + public static final AclType USER_OBJ = fromString("UserObj"); + + /** Static value GroupObj for AclType. */ + public static final AclType GROUP_OBJ = fromString("GroupObj"); + + /** Static value Other for AclType. */ + public static final AclType OTHER = fromString("Other"); + + /** Static value User for AclType. */ + public static final AclType USER = fromString("User"); + + /** Static value Group for AclType. */ + public static final AclType GROUP = fromString("Group"); + + /** + * Creates or finds a AclType from its string representation. + * @param name a name to look for + * @return the corresponding AclType + */ + @JsonCreator + public static AclType fromString(String name) { + return fromString(name, AclType.class); + } + + /** + * @return known AclType values + */ + public static Collection values() { + return values(AclType.class); + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BaseJobParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BaseJobParameters.java new file mode 100644 index 000000000000..7f0ceafaf3a1 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BaseJobParameters.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Analytics Job Parameters base class for build and submit. + */ +public class BaseJobParameters { + /** + * the job type of the current job (Hive or USql). Possible values include: + * 'USql', 'Hive'. + */ + @JsonProperty(value = "type", required = true) + private JobType type; + + /** + * the job specific properties. + */ + @JsonProperty(value = "properties", required = true) + private CreateJobProperties properties; + + /** + * Get the job type of the current job (Hive or USql). Possible values include: 'USql', 'Hive'. + * + * @return the type value + */ + public JobType type() { + return this.type; + } + + /** + * Set the job type of the current job (Hive or USql). Possible values include: 'USql', 'Hive'. + * + * @param type the type value to set + * @return the BaseJobParameters object itself. + */ + public BaseJobParameters withType(JobType type) { + this.type = type; + return this; + } + + /** + * Get the job specific properties. + * + * @return the properties value + */ + public CreateJobProperties properties() { + return this.properties; + } + + /** + * Set the job specific properties. + * + * @param properties the properties value to set + * @return the BaseJobParameters object itself. + */ + public BaseJobParameters withProperties(CreateJobProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BuildJobParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BuildJobParameters.java new file mode 100644 index 000000000000..e9825b8ca5dc --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/BuildJobParameters.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters used to build a new Data Lake Analytics job. + */ +public class BuildJobParameters extends BaseJobParameters { + /** + * the friendly name of the job to build. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get the friendly name of the job to build. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the friendly name of the job to build. + * + * @param name the name value to set + * @return the BuildJobParameters object itself. + */ + public BuildJobParameters withName(String name) { + this.name = name; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItem.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItem.java new file mode 100644 index 000000000000..c3bced2bc6de --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItem.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog item. + */ +public class CatalogItem { + /** + * the name of the Data Lake Analytics account. + */ + @JsonProperty(value = "computeAccountName") + private String computeAccountName; + + /** + * the version of the catalog item. + */ + @JsonProperty(value = "version") + private UUID version; + + /** + * Get the name of the Data Lake Analytics account. + * + * @return the computeAccountName value + */ + public String computeAccountName() { + return this.computeAccountName; + } + + /** + * Set the name of the Data Lake Analytics account. + * + * @param computeAccountName the computeAccountName value to set + * @return the CatalogItem object itself. + */ + public CatalogItem withComputeAccountName(String computeAccountName) { + this.computeAccountName = computeAccountName; + return this; + } + + /** + * Get the version of the catalog item. + * + * @return the version value + */ + public UUID version() { + return this.version; + } + + /** + * Set the version of the catalog item. + * + * @param version the version value to set + * @return the CatalogItem object itself. + */ + public CatalogItem withVersion(UUID version) { + this.version = version; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItemList.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItemList.java new file mode 100644 index 000000000000..02b5c2a74658 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CatalogItemList.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog item list. + */ +public class CatalogItemList { + /** + * the count of items in the list. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * the link to the next page of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the count of items in the list. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the count of items in the list. + * + * @param count the count value to set + * @return the CatalogItemList object itself. + */ + public CatalogItemList withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the link to the next page of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the link to the next page of results. + * + * @param nextLink the nextLink value to set + * @return the CatalogItemList object itself. + */ + public CatalogItemList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CompileMode.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CompileMode.java new file mode 100644 index 000000000000..d5761972f5ce --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CompileMode.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CompileMode. + */ +public enum CompileMode { + /** Enum value Semantic. */ + SEMANTIC("Semantic"), + + /** Enum value Full. */ + FULL("Full"), + + /** Enum value SingleBox. */ + SINGLE_BOX("SingleBox"); + + /** The actual serialized value for a CompileMode instance. */ + private String value; + + CompileMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CompileMode instance. + * + * @param value the serialized value to parse. + * @return the parsed CompileMode object, or null if unable to parse. + */ + @JsonCreator + public static CompileMode fromString(String value) { + CompileMode[] items = CompileMode.values(); + for (CompileMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobParameters.java new file mode 100644 index 000000000000..6d8698dccb2b --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobParameters.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters used to submit a new Data Lake Analytics job. + */ +public class CreateJobParameters extends BaseJobParameters { + /** + * the friendly name of the job to submit. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * the degree of parallelism used for this job. At most one of + * degreeOfParallelism and degreeOfParallelismPercent should be specified. + * If none, a default value of 1 will be used. + */ + @JsonProperty(value = "degreeOfParallelism") + private Integer degreeOfParallelism; + + /** + * the degree of parallelism in percentage used for this job. At most one + * of degreeOfParallelism and degreeOfParallelismPercent should be + * specified. If none, a default value of 1 will be used for + * degreeOfParallelism. + */ + @JsonProperty(value = "degreeOfParallelismPercent") + private Double degreeOfParallelismPercent; + + /** + * the priority value to use for the current job. Lower numbers have a + * higher priority. By default, a job has a priority of 1000. This must be + * greater than 0. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /** + * the list of log file name patterns to find in the logFolder. '*' is the + * only matching character allowed. Example format: jobExecution*.log or + * *mylog*.txt. + */ + @JsonProperty(value = "logFilePatterns") + private List logFilePatterns; + + /** + * the recurring job relationship information properties. + */ + @JsonProperty(value = "related") + private JobRelationshipProperties related; + + /** + * Get the friendly name of the job to submit. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the friendly name of the job to submit. + * + * @param name the name value to set + * @return the CreateJobParameters object itself. + */ + public CreateJobParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the degree of parallelism used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used. + * + * @return the degreeOfParallelism value + */ + public Integer degreeOfParallelism() { + return this.degreeOfParallelism; + } + + /** + * Set the degree of parallelism used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used. + * + * @param degreeOfParallelism the degreeOfParallelism value to set + * @return the CreateJobParameters object itself. + */ + public CreateJobParameters withDegreeOfParallelism(Integer degreeOfParallelism) { + this.degreeOfParallelism = degreeOfParallelism; + return this; + } + + /** + * Get the degree of parallelism in percentage used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used for degreeOfParallelism. + * + * @return the degreeOfParallelismPercent value + */ + public Double degreeOfParallelismPercent() { + return this.degreeOfParallelismPercent; + } + + /** + * Set the degree of parallelism in percentage used for this job. At most one of degreeOfParallelism and degreeOfParallelismPercent should be specified. If none, a default value of 1 will be used for degreeOfParallelism. + * + * @param degreeOfParallelismPercent the degreeOfParallelismPercent value to set + * @return the CreateJobParameters object itself. + */ + public CreateJobParameters withDegreeOfParallelismPercent(Double degreeOfParallelismPercent) { + this.degreeOfParallelismPercent = degreeOfParallelismPercent; + return this; + } + + /** + * Get the priority value to use for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority value to use for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0. + * + * @param priority the priority value to set + * @return the CreateJobParameters object itself. + */ + public CreateJobParameters withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the list of log file name patterns to find in the logFolder. '*' is the only matching character allowed. Example format: jobExecution*.log or *mylog*.txt. + * + * @return the logFilePatterns value + */ + public List logFilePatterns() { + return this.logFilePatterns; + } + + /** + * Set the list of log file name patterns to find in the logFolder. '*' is the only matching character allowed. Example format: jobExecution*.log or *mylog*.txt. + * + * @param logFilePatterns the logFilePatterns value to set + * @return the CreateJobParameters object itself. + */ + public CreateJobParameters withLogFilePatterns(List logFilePatterns) { + this.logFilePatterns = logFilePatterns; + return this; + } + + /** + * Get the recurring job relationship information properties. + * + * @return the related value + */ + public JobRelationshipProperties related() { + return this.related; + } + + /** + * Set the recurring job relationship information properties. + * + * @param related the related value to set + * @return the CreateJobParameters object itself. + */ + public CreateJobParameters withRelated(JobRelationshipProperties related) { + this.related = related; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobProperties.java new file mode 100644 index 000000000000..ce97b0723c08 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateJobProperties.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * The common Data Lake Analytics job properties for job submission. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("CreateJobProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "USql", value = CreateUSqlJobProperties.class) +}) +public class CreateJobProperties { + /** + * the runtime version of the Data Lake Analytics engine to use for the + * specific type of job being run. + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /** + * the script to run. Please note that the maximum script size is 3 MB. + */ + @JsonProperty(value = "script", required = true) + private String script; + + /** + * Get the runtime version of the Data Lake Analytics engine to use for the specific type of job being run. + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtime version of the Data Lake Analytics engine to use for the specific type of job being run. + * + * @param runtimeVersion the runtimeVersion value to set + * @return the CreateJobProperties object itself. + */ + public CreateJobProperties withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the script to run. Please note that the maximum script size is 3 MB. + * + * @return the script value + */ + public String script() { + return this.script; + } + + /** + * Set the script to run. Please note that the maximum script size is 3 MB. + * + * @param script the script value to set + * @return the CreateJobProperties object itself. + */ + public CreateJobProperties withScript(String script) { + this.script = script; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobParameters.java new file mode 100644 index 000000000000..879c7a696763 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobParameters.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters used to submit a new Data Lake Analytics Scope job. (Only for + * use internally with Scope job type.). + */ +public class CreateScopeJobParameters extends CreateJobParameters { + /** + * The key-value pairs used to add additional metadata to the job + * information. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the key-value pairs used to add additional metadata to the job information. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the key-value pairs used to add additional metadata to the job information. + * + * @param tags the tags value to set + * @return the CreateScopeJobParameters object itself. + */ + public CreateScopeJobParameters withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobProperties.java new file mode 100644 index 000000000000..d96400a2acec --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateScopeJobProperties.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Scope job properties used when submitting Scope jobs. (Only for use + * internally with Scope job type.). + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Scope") +public class CreateScopeJobProperties extends CreateJobProperties { + /** + * The list of resources that are required by the job. + */ + @JsonProperty(value = "resources") + private List resources; + + /** + * The list of email addresses, separated by semi-colons, to notify when + * the job reaches a terminal state. + */ + @JsonProperty(value = "notifier") + private String notifier; + + /** + * Get the list of resources that are required by the job. + * + * @return the resources value + */ + public List resources() { + return this.resources; + } + + /** + * Set the list of resources that are required by the job. + * + * @param resources the resources value to set + * @return the CreateScopeJobProperties object itself. + */ + public CreateScopeJobProperties withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Get the list of email addresses, separated by semi-colons, to notify when the job reaches a terminal state. + * + * @return the notifier value + */ + public String notifier() { + return this.notifier; + } + + /** + * Set the list of email addresses, separated by semi-colons, to notify when the job reaches a terminal state. + * + * @param notifier the notifier value to set + * @return the CreateScopeJobProperties object itself. + */ + public CreateScopeJobProperties withNotifier(String notifier) { + this.notifier = notifier; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateUSqlJobProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateUSqlJobProperties.java new file mode 100644 index 000000000000..92b4e7e0b8ae --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/CreateUSqlJobProperties.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * U-SQL job properties used when submitting U-SQL jobs. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("USql") +public class CreateUSqlJobProperties extends CreateJobProperties { + /** + * the specific compilation mode for the job used during execution. If this + * is not specified during submission, the server will determine the + * optimal compilation mode. Possible values include: 'Semantic', 'Full', + * 'SingleBox'. + */ + @JsonProperty(value = "compileMode") + private CompileMode compileMode; + + /** + * Get the specific compilation mode for the job used during execution. If this is not specified during submission, the server will determine the optimal compilation mode. Possible values include: 'Semantic', 'Full', 'SingleBox'. + * + * @return the compileMode value + */ + public CompileMode compileMode() { + return this.compileMode; + } + + /** + * Set the specific compilation mode for the job used during execution. If this is not specified during submission, the server will determine the optimal compilation mode. Possible values include: 'Semantic', 'Full', 'SingleBox'. + * + * @param compileMode the compileMode value to set + * @return the CreateUSqlJobProperties object itself. + */ + public CreateUSqlJobProperties withCompileMode(CompileMode compileMode) { + this.compileMode = compileMode; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialCreateParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialCreateParameters.java new file mode 100644 index 000000000000..3e1ff7fb0a29 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialCreateParameters.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Analytics catalog credential creation parameters. + */ +public class DataLakeAnalyticsCatalogCredentialCreateParameters { + /** + * the password for the credential and user with access to the data source. + */ + @JsonProperty(value = "password", required = true) + private String password; + + /** + * the URI identifier for the data source this credential can connect to in + * the format <hostname>:<port>. + */ + @JsonProperty(value = "uri", required = true) + private String uri; + + /** + * the object identifier for the user associated with this credential with + * access to the data source. + */ + @JsonProperty(value = "userId", required = true) + private String userId; + + /** + * Get the password for the credential and user with access to the data source. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password for the credential and user with access to the data source. + * + * @param password the password value to set + * @return the DataLakeAnalyticsCatalogCredentialCreateParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialCreateParameters withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the URI identifier for the data source this credential can connect to in the format <hostname>:<port>. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set the URI identifier for the data source this credential can connect to in the format <hostname>:<port>. + * + * @param uri the uri value to set + * @return the DataLakeAnalyticsCatalogCredentialCreateParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialCreateParameters withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the object identifier for the user associated with this credential with access to the data source. + * + * @return the userId value + */ + public String userId() { + return this.userId; + } + + /** + * Set the object identifier for the user associated with this credential with access to the data source. + * + * @param userId the userId value to set + * @return the DataLakeAnalyticsCatalogCredentialCreateParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialCreateParameters withUserId(String userId) { + this.userId = userId; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialDeleteParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialDeleteParameters.java new file mode 100644 index 000000000000..fd2d445ea78b --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialDeleteParameters.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Analytics catalog credential deletion parameters. + */ +public class DataLakeAnalyticsCatalogCredentialDeleteParameters { + /** + * the current password for the credential and user with access to the data + * source. This is required if the requester is not the account owner. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the current password for the credential and user with access to the data source. This is required if the requester is not the account owner. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the current password for the credential and user with access to the data source. This is required if the requester is not the account owner. + * + * @param password the password value to set + * @return the DataLakeAnalyticsCatalogCredentialDeleteParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialDeleteParameters withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialUpdateParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialUpdateParameters.java new file mode 100644 index 000000000000..d7e2c0f01007 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogCredentialUpdateParameters.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Analytics catalog credential update parameters. + */ +public class DataLakeAnalyticsCatalogCredentialUpdateParameters { + /** + * the current password for the credential and user with access to the data + * source. This is required if the requester is not the account owner. + */ + @JsonProperty(value = "password") + private String password; + + /** + * the new password for the credential and user with access to the data + * source. + */ + @JsonProperty(value = "newPassword") + private String newPassword; + + /** + * the URI identifier for the data source this credential can connect to in + * the format <hostname>:<port>. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * the object identifier for the user associated with this credential with + * access to the data source. + */ + @JsonProperty(value = "userId") + private String userId; + + /** + * Get the current password for the credential and user with access to the data source. This is required if the requester is not the account owner. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the current password for the credential and user with access to the data source. This is required if the requester is not the account owner. + * + * @param password the password value to set + * @return the DataLakeAnalyticsCatalogCredentialUpdateParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialUpdateParameters withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the new password for the credential and user with access to the data source. + * + * @return the newPassword value + */ + public String newPassword() { + return this.newPassword; + } + + /** + * Set the new password for the credential and user with access to the data source. + * + * @param newPassword the newPassword value to set + * @return the DataLakeAnalyticsCatalogCredentialUpdateParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialUpdateParameters withNewPassword(String newPassword) { + this.newPassword = newPassword; + return this; + } + + /** + * Get the URI identifier for the data source this credential can connect to in the format <hostname>:<port>. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set the URI identifier for the data source this credential can connect to in the format <hostname>:<port>. + * + * @param uri the uri value to set + * @return the DataLakeAnalyticsCatalogCredentialUpdateParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialUpdateParameters withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the object identifier for the user associated with this credential with access to the data source. + * + * @return the userId value + */ + public String userId() { + return this.userId; + } + + /** + * Set the object identifier for the user associated with this credential with access to the data source. + * + * @param userId the userId value to set + * @return the DataLakeAnalyticsCatalogCredentialUpdateParameters object itself. + */ + public DataLakeAnalyticsCatalogCredentialUpdateParameters withUserId(String userId) { + this.userId = userId; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters.java new file mode 100644 index 000000000000..018cab8797f6 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DataLakeAnalytics DataLakeAnalyticsAccount information. + */ +public class DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters { + /** + * the password for the secret to pass in. + */ + @JsonProperty(value = "password", required = true) + private String password; + + /** + * the URI identifier for the secret in the format + * <hostname>:<port>. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * Get the password for the secret to pass in. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password for the secret to pass in. + * + * @param password the password value to set + * @return the DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters object itself. + */ + public DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the URI identifier for the secret in the format <hostname>:<port>. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set the URI identifier for the secret in the format <hostname>:<port>. + * + * @param uri the uri value to set + * @return the DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters object itself. + */ + public DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters withUri(String uri) { + this.uri = uri; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DdlName.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DdlName.java new file mode 100644 index 000000000000..705d4effcf15 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/DdlName.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics DDL name item. + */ +public class DdlName { + /** + * the name of the table associated with this database and schema. + */ + @JsonProperty(value = "firstPart") + private String firstPart; + + /** + * the name of the table associated with this database and schema. + */ + @JsonProperty(value = "secondPart") + private String secondPart; + + /** + * the name of the table associated with this database and schema. + */ + @JsonProperty(value = "thirdPart") + private String thirdPart; + + /** + * the name of the table associated with this database and schema. + */ + @JsonProperty(value = "server") + private String server; + + /** + * Get the name of the table associated with this database and schema. + * + * @return the firstPart value + */ + public String firstPart() { + return this.firstPart; + } + + /** + * Set the name of the table associated with this database and schema. + * + * @param firstPart the firstPart value to set + * @return the DdlName object itself. + */ + public DdlName withFirstPart(String firstPart) { + this.firstPart = firstPart; + return this; + } + + /** + * Get the name of the table associated with this database and schema. + * + * @return the secondPart value + */ + public String secondPart() { + return this.secondPart; + } + + /** + * Set the name of the table associated with this database and schema. + * + * @param secondPart the secondPart value to set + * @return the DdlName object itself. + */ + public DdlName withSecondPart(String secondPart) { + this.secondPart = secondPart; + return this; + } + + /** + * Get the name of the table associated with this database and schema. + * + * @return the thirdPart value + */ + public String thirdPart() { + return this.thirdPart; + } + + /** + * Set the name of the table associated with this database and schema. + * + * @param thirdPart the thirdPart value to set + * @return the DdlName object itself. + */ + public DdlName withThirdPart(String thirdPart) { + this.thirdPart = thirdPart; + return this; + } + + /** + * Get the name of the table associated with this database and schema. + * + * @return the server value + */ + public String server() { + return this.server; + } + + /** + * Set the name of the table associated with this database and schema. + * + * @param server the server value to set + * @return the DdlName object itself. + */ + public DdlName withServer(String server) { + this.server = server; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Diagnostics.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Diagnostics.java new file mode 100644 index 000000000000..e06275f984a6 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/Diagnostics.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Diagnostics model. + */ +public class Diagnostics { + /** + * the column where the error occured. + */ + @JsonProperty(value = "columnNumber", access = JsonProperty.Access.WRITE_ONLY) + private Integer columnNumber; + + /** + * the ending index of the error. + */ + @JsonProperty(value = "end", access = JsonProperty.Access.WRITE_ONLY) + private Integer end; + + /** + * the line number the error occured on. + */ + @JsonProperty(value = "lineNumber", access = JsonProperty.Access.WRITE_ONLY) + private Integer lineNumber; + + /** + * the error message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * the severity of the error. Possible values include: 'Warning', 'Error', + * 'Info'. + */ + @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) + private SeverityTypes severity; + + /** + * the starting index of the error. + */ + @JsonProperty(value = "start", access = JsonProperty.Access.WRITE_ONLY) + private Integer start; + + /** + * Get the column where the error occured. + * + * @return the columnNumber value + */ + public Integer columnNumber() { + return this.columnNumber; + } + + /** + * Get the ending index of the error. + * + * @return the end value + */ + public Integer end() { + return this.end; + } + + /** + * Get the line number the error occured on. + * + * @return the lineNumber value + */ + public Integer lineNumber() { + return this.lineNumber; + } + + /** + * Get the error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the severity of the error. Possible values include: 'Warning', 'Error', 'Info'. + * + * @return the severity value + */ + public SeverityTypes severity() { + return this.severity; + } + + /** + * Get the starting index of the error. + * + * @return the start value + */ + public Integer start() { + return this.start; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/EntityId.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/EntityId.java new file mode 100644 index 000000000000..b04caf16ff57 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/EntityId.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog entity identifier object. + */ +public class EntityId { + /** + * the name of the external table associated with this database, schema and + * table. + */ + @JsonProperty(value = "name") + private DdlName name; + + /** + * the version of the external data source. + */ + @JsonProperty(value = "version") + private UUID version; + + /** + * Get the name of the external table associated with this database, schema and table. + * + * @return the name value + */ + public DdlName name() { + return this.name; + } + + /** + * Set the name of the external table associated with this database, schema and table. + * + * @param name the name value to set + * @return the EntityId object itself. + */ + public EntityId withName(DdlName name) { + this.name = name; + return this; + } + + /** + * Get the version of the external data source. + * + * @return the version value + */ + public UUID version() { + return this.version; + } + + /** + * Set the version of the external data source. + * + * @param version the version value to set + * @return the EntityId object itself. + */ + public EntityId withVersion(UUID version) { + this.version = version; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ExternalTable.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ExternalTable.java new file mode 100644 index 000000000000..a29486161a57 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ExternalTable.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog external table item. + */ +public class ExternalTable { + /** + * the name of the table associated with this database and schema. + */ + @JsonProperty(value = "tableName") + private String tableName; + + /** + * the data source associated with this external table. + */ + @JsonProperty(value = "dataSource") + private EntityId dataSource; + + /** + * Get the name of the table associated with this database and schema. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the name of the table associated with this database and schema. + * + * @param tableName the tableName value to set + * @return the ExternalTable object itself. + */ + public ExternalTable withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the data source associated with this external table. + * + * @return the dataSource value + */ + public EntityId dataSource() { + return this.dataSource; + } + + /** + * Set the data source associated with this external table. + * + * @param dataSource the dataSource value to set + * @return the ExternalTable object itself. + */ + public ExternalTable withDataSource(EntityId dataSource) { + this.dataSource = dataSource; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/FileType.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/FileType.java new file mode 100644 index 000000000000..cd733e8cfcfb --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/FileType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FileType. + */ +public enum FileType { + /** Enum value Assembly. */ + ASSEMBLY("Assembly"), + + /** Enum value Resource. */ + RESOURCE("Resource"); + + /** The actual serialized value for a FileType instance. */ + private String value; + + FileType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FileType instance. + * + * @param value the serialized value to parse. + * @return the parsed FileType object, or null if unable to parse. + */ + @JsonCreator + public static FileType fromString(String value) { + FileType[] items = FileType.values(); + for (FileType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobProperties.java new file mode 100644 index 000000000000..5fe362421802 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobProperties.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The HiveJobProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Hive") +public class HiveJobProperties extends JobProperties { + /** + * Gets or sets the statement information for each statement in the script. + */ + @JsonProperty(value = "statementInfo") + private List statementInfo; + + /** + * Gets or sets the Hive logs location. + */ + @JsonProperty(value = "logsLocation") + private String logsLocation; + + /** + * Gets or sets the runtime version of the U-SQL engine to use. + */ + @JsonProperty(value = "warehouseLocation") + private String warehouseLocation; + + /** + * Gets or sets the number of statements that will be run based on the + * script. + */ + @JsonProperty(value = "statementCount") + private Integer statementCount; + + /** + * Gets or sets the number of statements that have been run based on the + * script. + */ + @JsonProperty(value = "executedStatementCount") + private Integer executedStatementCount; + + /** + * Get gets or sets the statement information for each statement in the script. + * + * @return the statementInfo value + */ + public List statementInfo() { + return this.statementInfo; + } + + /** + * Set gets or sets the statement information for each statement in the script. + * + * @param statementInfo the statementInfo value to set + * @return the HiveJobProperties object itself. + */ + public HiveJobProperties withStatementInfo(List statementInfo) { + this.statementInfo = statementInfo; + return this; + } + + /** + * Get gets or sets the Hive logs location. + * + * @return the logsLocation value + */ + public String logsLocation() { + return this.logsLocation; + } + + /** + * Set gets or sets the Hive logs location. + * + * @param logsLocation the logsLocation value to set + * @return the HiveJobProperties object itself. + */ + public HiveJobProperties withLogsLocation(String logsLocation) { + this.logsLocation = logsLocation; + return this; + } + + /** + * Get gets or sets the runtime version of the U-SQL engine to use. + * + * @return the warehouseLocation value + */ + public String warehouseLocation() { + return this.warehouseLocation; + } + + /** + * Set gets or sets the runtime version of the U-SQL engine to use. + * + * @param warehouseLocation the warehouseLocation value to set + * @return the HiveJobProperties object itself. + */ + public HiveJobProperties withWarehouseLocation(String warehouseLocation) { + this.warehouseLocation = warehouseLocation; + return this; + } + + /** + * Get gets or sets the number of statements that will be run based on the script. + * + * @return the statementCount value + */ + public Integer statementCount() { + return this.statementCount; + } + + /** + * Set gets or sets the number of statements that will be run based on the script. + * + * @param statementCount the statementCount value to set + * @return the HiveJobProperties object itself. + */ + public HiveJobProperties withStatementCount(Integer statementCount) { + this.statementCount = statementCount; + return this; + } + + /** + * Get gets or sets the number of statements that have been run based on the script. + * + * @return the executedStatementCount value + */ + public Integer executedStatementCount() { + return this.executedStatementCount; + } + + /** + * Set gets or sets the number of statements that have been run based on the script. + * + * @param executedStatementCount the executedStatementCount value to set + * @return the HiveJobProperties object itself. + */ + public HiveJobProperties withExecutedStatementCount(Integer executedStatementCount) { + this.executedStatementCount = executedStatementCount; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobStatementInfo.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobStatementInfo.java new file mode 100644 index 000000000000..4edb3bb761ea --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/HiveJobStatementInfo.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The HiveJobStatementInfo model. + */ +public class HiveJobStatementInfo { + /** + * Gets or sets the log location for this statement. + */ + @JsonProperty(value = "logLocation") + private String logLocation; + + /** + * Gets or sets the result preview location for this statement. + */ + @JsonProperty(value = "resultPreviewLocation") + private String resultPreviewLocation; + + /** + * Gets or sets the result location for this statement. + */ + @JsonProperty(value = "resultLocation") + private String resultLocation; + + /** + * Gets or sets the error message for this statement. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** + * Get gets or sets the log location for this statement. + * + * @return the logLocation value + */ + public String logLocation() { + return this.logLocation; + } + + /** + * Set gets or sets the log location for this statement. + * + * @param logLocation the logLocation value to set + * @return the HiveJobStatementInfo object itself. + */ + public HiveJobStatementInfo withLogLocation(String logLocation) { + this.logLocation = logLocation; + return this; + } + + /** + * Get gets or sets the result preview location for this statement. + * + * @return the resultPreviewLocation value + */ + public String resultPreviewLocation() { + return this.resultPreviewLocation; + } + + /** + * Set gets or sets the result preview location for this statement. + * + * @param resultPreviewLocation the resultPreviewLocation value to set + * @return the HiveJobStatementInfo object itself. + */ + public HiveJobStatementInfo withResultPreviewLocation(String resultPreviewLocation) { + this.resultPreviewLocation = resultPreviewLocation; + return this; + } + + /** + * Get gets or sets the result location for this statement. + * + * @return the resultLocation value + */ + public String resultLocation() { + return this.resultLocation; + } + + /** + * Set gets or sets the result location for this statement. + * + * @param resultLocation the resultLocation value to set + * @return the HiveJobStatementInfo object itself. + */ + public HiveJobStatementInfo withResultLocation(String resultLocation) { + this.resultLocation = resultLocation; + return this; + } + + /** + * Get gets or sets the error message for this statement. + * + * @return the errorMessage value + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set gets or sets the error message for this statement. + * + * @param errorMessage the errorMessage value to set + * @return the HiveJobStatementInfo object itself. + */ + public HiveJobStatementInfo withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobDataPath.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobDataPath.java new file mode 100644 index 000000000000..5bfeff1aed52 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobDataPath.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics U-SQL job data path item. + */ +public class JobDataPath { + /** + * Gets the id of the job this data is for. + */ + @JsonProperty(value = "jobId", access = JsonProperty.Access.WRITE_ONLY) + private UUID jobId; + + /** + * Gets the command that this job data relates to. + */ + @JsonProperty(value = "command", access = JsonProperty.Access.WRITE_ONLY) + private String command; + + /** + * Gets the list of paths to all of the job data. + */ + @JsonProperty(value = "paths", access = JsonProperty.Access.WRITE_ONLY) + private List paths; + + /** + * Get gets the id of the job this data is for. + * + * @return the jobId value + */ + public UUID jobId() { + return this.jobId; + } + + /** + * Get gets the command that this job data relates to. + * + * @return the command value + */ + public String command() { + return this.command; + } + + /** + * Get gets the list of paths to all of the job data. + * + * @return the paths value + */ + public List paths() { + return this.paths; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobErrorDetails.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobErrorDetails.java new file mode 100644 index 000000000000..a2f430f2f187 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobErrorDetails.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Data Lake Analytics job error details. + */ +public class JobErrorDetails { + /** + * Gets the error message description. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Gets the details of the error message. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private String details; + + /** + * Gets the end offset in the job where the error was found. + */ + @JsonProperty(value = "endOffset", access = JsonProperty.Access.WRITE_ONLY) + private Integer endOffset; + + /** + * Gets the specific identifier for the type of error encountered in the + * job. + */ + @JsonProperty(value = "errorId", access = JsonProperty.Access.WRITE_ONLY) + private String errorId; + + /** + * Gets the path to any supplemental error files, if any. + */ + @JsonProperty(value = "filePath", access = JsonProperty.Access.WRITE_ONLY) + private String filePath; + + /** + * Gets the link to MSDN or Azure help for this type of error, if any. + */ + @JsonProperty(value = "helpLink", access = JsonProperty.Access.WRITE_ONLY) + private String helpLink; + + /** + * Gets the internal diagnostic stack trace if the user requesting the job + * error details has sufficient permissions it will be retrieved, otherwise + * it will be empty. + */ + @JsonProperty(value = "internalDiagnostics", access = JsonProperty.Access.WRITE_ONLY) + private String internalDiagnostics; + + /** + * Gets the specific line number in the job where the error occured. + */ + @JsonProperty(value = "lineNumber", access = JsonProperty.Access.WRITE_ONLY) + private Integer lineNumber; + + /** + * Gets the user friendly error message for the failure. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Gets the recommended resolution for the failure, if any. + */ + @JsonProperty(value = "resolution", access = JsonProperty.Access.WRITE_ONLY) + private String resolution; + + /** + * Gets the inner error of this specific job error message, if any. + */ + @JsonProperty(value = "InnerError", access = JsonProperty.Access.WRITE_ONLY) + private JobInnerError innerError; + + /** + * Gets the severity level of the failure. Possible values include: + * 'Warning', 'Error'. + */ + @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) + private SeverityTypes severity; + + /** + * Gets the ultimate source of the failure (usually either SYSTEM or USER). + */ + @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY) + private String source; + + /** + * Gets the start offset in the job where the error was found. + */ + @JsonProperty(value = "startOffset", access = JsonProperty.Access.WRITE_ONLY) + private Integer startOffset; + + /** + * Get gets the error message description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get gets the details of the error message. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Get gets the end offset in the job where the error was found. + * + * @return the endOffset value + */ + public Integer endOffset() { + return this.endOffset; + } + + /** + * Get gets the specific identifier for the type of error encountered in the job. + * + * @return the errorId value + */ + public String errorId() { + return this.errorId; + } + + /** + * Get gets the path to any supplemental error files, if any. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Get gets the link to MSDN or Azure help for this type of error, if any. + * + * @return the helpLink value + */ + public String helpLink() { + return this.helpLink; + } + + /** + * Get gets the internal diagnostic stack trace if the user requesting the job error details has sufficient permissions it will be retrieved, otherwise it will be empty. + * + * @return the internalDiagnostics value + */ + public String internalDiagnostics() { + return this.internalDiagnostics; + } + + /** + * Get gets the specific line number in the job where the error occured. + * + * @return the lineNumber value + */ + public Integer lineNumber() { + return this.lineNumber; + } + + /** + * Get gets the user friendly error message for the failure. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get gets the recommended resolution for the failure, if any. + * + * @return the resolution value + */ + public String resolution() { + return this.resolution; + } + + /** + * Get gets the inner error of this specific job error message, if any. + * + * @return the innerError value + */ + public JobInnerError innerError() { + return this.innerError; + } + + /** + * Get gets the severity level of the failure. Possible values include: 'Warning', 'Error'. + * + * @return the severity value + */ + public SeverityTypes severity() { + return this.severity; + } + + /** + * Get gets the ultimate source of the failure (usually either SYSTEM or USER). + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Get gets the start offset in the job where the error was found. + * + * @return the startOffset value + */ + public Integer startOffset() { + return this.startOffset; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformation.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformation.java new file mode 100644 index 000000000000..63c1055741f0 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformation.java @@ -0,0 +1,343 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The common Data Lake Analytics job information properties. + */ +public class JobInformation { + /** + * Gets or sets the job's unique identifier (a GUID). + */ + @JsonProperty(value = "jobId") + private UUID jobId; + + /** + * Gets or sets the friendly name of the job. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Gets or sets the job type of the current job (Hive or USql). Possible + * values include: 'USql', 'Hive'. + */ + @JsonProperty(value = "type", required = true) + private JobType type; + + /** + * Gets or sets the user or account that submitted the job. + */ + @JsonProperty(value = "submitter") + private String submitter; + + /** + * Gets the error message details for the job, if the job failed. + */ + @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) + private List errorMessage; + + /** + * Gets or sets the degree of parallelism used for this job. This must be + * greater than 0. + */ + @JsonProperty(value = "degreeOfParallelism") + private Integer degreeOfParallelism; + + /** + * the degree of parallelism in percentage used for this job. + */ + @JsonProperty(value = "degreeOfParallelismPercent") + private Double degreeOfParallelismPercent; + + /** + * Gets or sets the priority value for the current job. Lower numbers have + * a higher priority. By default, a job has a priority of 1000. This must + * be greater than 0. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /** + * Gets the time the job was submitted to the service. + */ + @JsonProperty(value = "submitTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime submitTime; + + /** + * Gets the start time of the job. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * Gets the completion time of the job. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Gets the job state. When the job is in the Ended state, refer to Result + * and ErrorMessage for details. Possible values include: 'Accepted', + * 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', + * 'Starting', 'Paused', 'WaitingForCapacity'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private JobState state; + + /** + * Gets the result of job execution or the current result of the running + * job. Possible values include: 'None', 'Succeeded', 'Cancelled', + * 'Failed'. + */ + @JsonProperty(value = "result", access = JsonProperty.Access.WRITE_ONLY) + private JobResult result; + + /** + * Gets the job state audit records, indicating when various operations + * have been performed on this job. + */ + @JsonProperty(value = "stateAuditRecords", access = JsonProperty.Access.WRITE_ONLY) + private List stateAuditRecords; + + /** + * Gets or sets the job specific properties. + */ + @JsonProperty(value = "properties", required = true) + private JobProperties properties; + + /** + * Get gets or sets the job's unique identifier (a GUID). + * + * @return the jobId value + */ + public UUID jobId() { + return this.jobId; + } + + /** + * Set gets or sets the job's unique identifier (a GUID). + * + * @param jobId the jobId value to set + * @return the JobInformation object itself. + */ + public JobInformation withJobId(UUID jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get gets or sets the friendly name of the job. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set gets or sets the friendly name of the job. + * + * @param name the name value to set + * @return the JobInformation object itself. + */ + public JobInformation withName(String name) { + this.name = name; + return this; + } + + /** + * Get gets or sets the job type of the current job (Hive or USql). Possible values include: 'USql', 'Hive'. + * + * @return the type value + */ + public JobType type() { + return this.type; + } + + /** + * Set gets or sets the job type of the current job (Hive or USql). Possible values include: 'USql', 'Hive'. + * + * @param type the type value to set + * @return the JobInformation object itself. + */ + public JobInformation withType(JobType type) { + this.type = type; + return this; + } + + /** + * Get gets or sets the user or account that submitted the job. + * + * @return the submitter value + */ + public String submitter() { + return this.submitter; + } + + /** + * Set gets or sets the user or account that submitted the job. + * + * @param submitter the submitter value to set + * @return the JobInformation object itself. + */ + public JobInformation withSubmitter(String submitter) { + this.submitter = submitter; + return this; + } + + /** + * Get gets the error message details for the job, if the job failed. + * + * @return the errorMessage value + */ + public List errorMessage() { + return this.errorMessage; + } + + /** + * Get gets or sets the degree of parallelism used for this job. This must be greater than 0. + * + * @return the degreeOfParallelism value + */ + public Integer degreeOfParallelism() { + return this.degreeOfParallelism; + } + + /** + * Set gets or sets the degree of parallelism used for this job. This must be greater than 0. + * + * @param degreeOfParallelism the degreeOfParallelism value to set + * @return the JobInformation object itself. + */ + public JobInformation withDegreeOfParallelism(Integer degreeOfParallelism) { + this.degreeOfParallelism = degreeOfParallelism; + return this; + } + + /** + * Get the degree of parallelism in percentage used for this job. + * + * @return the degreeOfParallelismPercent value + */ + public Double degreeOfParallelismPercent() { + return this.degreeOfParallelismPercent; + } + + /** + * Set the degree of parallelism in percentage used for this job. + * + * @param degreeOfParallelismPercent the degreeOfParallelismPercent value to set + * @return the JobInformation object itself. + */ + public JobInformation withDegreeOfParallelismPercent(Double degreeOfParallelismPercent) { + this.degreeOfParallelismPercent = degreeOfParallelismPercent; + return this; + } + + /** + * Get gets or sets the priority value for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set gets or sets the priority value for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0. + * + * @param priority the priority value to set + * @return the JobInformation object itself. + */ + public JobInformation withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get gets the time the job was submitted to the service. + * + * @return the submitTime value + */ + public DateTime submitTime() { + return this.submitTime; + } + + /** + * Get gets the start time of the job. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get gets the completion time of the job. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get gets the job state. When the job is in the Ended state, refer to Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', 'Starting', 'Paused', 'WaitingForCapacity'. + * + * @return the state value + */ + public JobState state() { + return this.state; + } + + /** + * Get gets the result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', 'Failed'. + * + * @return the result value + */ + public JobResult result() { + return this.result; + } + + /** + * Get gets the job state audit records, indicating when various operations have been performed on this job. + * + * @return the stateAuditRecords value + */ + public List stateAuditRecords() { + return this.stateAuditRecords; + } + + /** + * Get gets or sets the job specific properties. + * + * @return the properties value + */ + public JobProperties properties() { + return this.properties; + } + + /** + * Set gets or sets the job specific properties. + * + * @param properties the properties value to set + * @return the JobInformation object itself. + */ + public JobInformation withProperties(JobProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformationBasic.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformationBasic.java new file mode 100644 index 000000000000..9ae5f1f4597f --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInformationBasic.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The common Data Lake Analytics job information properties. + */ +public class JobInformationBasic { + /** + * the job's unique identifier (a GUID). + */ + @JsonProperty(value = "jobId", access = JsonProperty.Access.WRITE_ONLY) + private UUID jobId; + + /** + * the friendly name of the job. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * the job type of the current job (Hive or USql). Possible values include: + * 'USql', 'Hive'. + */ + @JsonProperty(value = "type", required = true) + private JobType type; + + /** + * the user or account that submitted the job. + */ + @JsonProperty(value = "submitter", access = JsonProperty.Access.WRITE_ONLY) + private String submitter; + + /** + * the degree of parallelism used for this job. + */ + @JsonProperty(value = "degreeOfParallelism", access = JsonProperty.Access.WRITE_ONLY) + private Integer degreeOfParallelism; + + /** + * the degree of parallelism in percentage used for this job. + */ + @JsonProperty(value = "degreeOfParallelismPercent", access = JsonProperty.Access.WRITE_ONLY) + private Double degreeOfParallelismPercent; + + /** + * the priority value for the current job. Lower numbers have a higher + * priority. By default, a job has a priority of 1000. This must be greater + * than 0. + */ + @JsonProperty(value = "priority", access = JsonProperty.Access.WRITE_ONLY) + private Integer priority; + + /** + * the time the job was submitted to the service. + */ + @JsonProperty(value = "submitTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime submitTime; + + /** + * the start time of the job. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * the completion time of the job. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * the job state. When the job is in the Ended state, refer to Result and + * ErrorMessage for details. Possible values include: 'Accepted', + * 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', + * 'Starting', 'Paused', 'WaitingForCapacity'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private JobState state; + + /** + * the result of job execution or the current result of the running job. + * Possible values include: 'None', 'Succeeded', 'Cancelled', 'Failed'. + */ + @JsonProperty(value = "result", access = JsonProperty.Access.WRITE_ONLY) + private JobResult result; + + /** + * the log folder path to use in the following format: + * adl://<accountName>.azuredatalakestore.net/system/jobservice/jobs/Usql/2016/03/13/17/18/5fe51957-93bc-4de0-8ddc-c5a4753b068b/logs/. + */ + @JsonProperty(value = "logFolder", access = JsonProperty.Access.WRITE_ONLY) + private String logFolder; + + /** + * the list of log file name patterns to find in the logFolder. '*' is the + * only matching character allowed. Example format: jobExecution*.log or + * *mylog*.txt. + */ + @JsonProperty(value = "logFilePatterns", access = JsonProperty.Access.WRITE_ONLY) + private List logFilePatterns; + + /** + * the recurring job relationship information properties. + */ + @JsonProperty(value = "related") + private JobRelationshipProperties related; + + /** + * Get the job's unique identifier (a GUID). + * + * @return the jobId value + */ + public UUID jobId() { + return this.jobId; + } + + /** + * Get the friendly name of the job. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the friendly name of the job. + * + * @param name the name value to set + * @return the JobInformationBasic object itself. + */ + public JobInformationBasic withName(String name) { + this.name = name; + return this; + } + + /** + * Get the job type of the current job (Hive or USql). Possible values include: 'USql', 'Hive'. + * + * @return the type value + */ + public JobType type() { + return this.type; + } + + /** + * Set the job type of the current job (Hive or USql). Possible values include: 'USql', 'Hive'. + * + * @param type the type value to set + * @return the JobInformationBasic object itself. + */ + public JobInformationBasic withType(JobType type) { + this.type = type; + return this; + } + + /** + * Get the user or account that submitted the job. + * + * @return the submitter value + */ + public String submitter() { + return this.submitter; + } + + /** + * Get the degree of parallelism used for this job. + * + * @return the degreeOfParallelism value + */ + public Integer degreeOfParallelism() { + return this.degreeOfParallelism; + } + + /** + * Get the degree of parallelism in percentage used for this job. + * + * @return the degreeOfParallelismPercent value + */ + public Double degreeOfParallelismPercent() { + return this.degreeOfParallelismPercent; + } + + /** + * Get the priority value for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Get the time the job was submitted to the service. + * + * @return the submitTime value + */ + public DateTime submitTime() { + return this.submitTime; + } + + /** + * Get the start time of the job. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get the completion time of the job. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get the job state. When the job is in the Ended state, refer to Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', 'Starting', 'Paused', 'WaitingForCapacity'. + * + * @return the state value + */ + public JobState state() { + return this.state; + } + + /** + * Get the result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', 'Failed'. + * + * @return the result value + */ + public JobResult result() { + return this.result; + } + + /** + * Get the log folder path to use in the following format: adl://<accountName>.azuredatalakestore.net/system/jobservice/jobs/Usql/2016/03/13/17/18/5fe51957-93bc-4de0-8ddc-c5a4753b068b/logs/. + * + * @return the logFolder value + */ + public String logFolder() { + return this.logFolder; + } + + /** + * Get the list of log file name patterns to find in the logFolder. '*' is the only matching character allowed. Example format: jobExecution*.log or *mylog*.txt. + * + * @return the logFilePatterns value + */ + public List logFilePatterns() { + return this.logFilePatterns; + } + + /** + * Get the recurring job relationship information properties. + * + * @return the related value + */ + public JobRelationshipProperties related() { + return this.related; + } + + /** + * Set the recurring job relationship information properties. + * + * @param related the related value to set + * @return the JobInformationBasic object itself. + */ + public JobInformationBasic withRelated(JobRelationshipProperties related) { + this.related = related; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInnerError.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInnerError.java new file mode 100644 index 000000000000..d73777de5c35 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobInnerError.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Data Lake Analytics job error details. + */ +public class JobInnerError { + /** + * Gets the diagnostic error code. + */ + @JsonProperty(value = "diagnosticCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer diagnosticCode; + + /** + * Gets the severity level of the failure. Possible values include: + * 'Warning', 'Error'. + */ + @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) + private SeverityTypes severity; + + /** + * Gets the details of the error message. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private String details; + + /** + * Gets the component that failed. + */ + @JsonProperty(value = "component", access = JsonProperty.Access.WRITE_ONLY) + private String component; + + /** + * Gets the specific identifier for the type of error encountered in the + * job. + */ + @JsonProperty(value = "errorId", access = JsonProperty.Access.WRITE_ONLY) + private String errorId; + + /** + * Gets the link to MSDN or Azure help for this type of error, if any. + */ + @JsonProperty(value = "helpLink", access = JsonProperty.Access.WRITE_ONLY) + private String helpLink; + + /** + * Gets the internal diagnostic stack trace if the user requesting the job + * error details has sufficient permissions it will be retrieved, otherwise + * it will be empty. + */ + @JsonProperty(value = "internalDiagnostics", access = JsonProperty.Access.WRITE_ONLY) + private String internalDiagnostics; + + /** + * Gets the user friendly error message for the failure. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Gets the recommended resolution for the failure, if any. + */ + @JsonProperty(value = "resolution", access = JsonProperty.Access.WRITE_ONLY) + private String resolution; + + /** + * Gets the ultimate source of the failure (usually either SYSTEM or USER). + */ + @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY) + private String source; + + /** + * Gets the error message description. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get gets the diagnostic error code. + * + * @return the diagnosticCode value + */ + public Integer diagnosticCode() { + return this.diagnosticCode; + } + + /** + * Get gets the severity level of the failure. Possible values include: 'Warning', 'Error'. + * + * @return the severity value + */ + public SeverityTypes severity() { + return this.severity; + } + + /** + * Get gets the details of the error message. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Get gets the component that failed. + * + * @return the component value + */ + public String component() { + return this.component; + } + + /** + * Get gets the specific identifier for the type of error encountered in the job. + * + * @return the errorId value + */ + public String errorId() { + return this.errorId; + } + + /** + * Get gets the link to MSDN or Azure help for this type of error, if any. + * + * @return the helpLink value + */ + public String helpLink() { + return this.helpLink; + } + + /** + * Get gets the internal diagnostic stack trace if the user requesting the job error details has sufficient permissions it will be retrieved, otherwise it will be empty. + * + * @return the internalDiagnostics value + */ + public String internalDiagnostics() { + return this.internalDiagnostics; + } + + /** + * Get gets the user friendly error message for the failure. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get gets the recommended resolution for the failure, if any. + * + * @return the resolution value + */ + public String resolution() { + return this.resolution; + } + + /** + * Get gets the ultimate source of the failure (usually either SYSTEM or USER). + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Get gets the error message description. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineInformation.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineInformation.java new file mode 100644 index 000000000000..7e45a4ba9b94 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineInformation.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Job Pipeline Information, showing the relationship of jobs and recurrences + * of those jobs in a pipeline. + */ +public class JobPipelineInformation { + /** + * the job relationship pipeline identifier (a GUID). + */ + @JsonProperty(value = "pipelineId", access = JsonProperty.Access.WRITE_ONLY) + private UUID pipelineId; + + /** + * the friendly name of the job relationship pipeline, which does not need + * to be unique. + */ + @JsonProperty(value = "pipelineName", access = JsonProperty.Access.WRITE_ONLY) + private String pipelineName; + + /** + * the pipeline uri, unique, links to the originating service for this + * pipeline. + */ + @JsonProperty(value = "pipelineUri", access = JsonProperty.Access.WRITE_ONLY) + private String pipelineUri; + + /** + * the number of jobs in this pipeline that have failed. + */ + @JsonProperty(value = "numJobsFailed", access = JsonProperty.Access.WRITE_ONLY) + private Integer numJobsFailed; + + /** + * the number of jobs in this pipeline that have been canceled. + */ + @JsonProperty(value = "numJobsCanceled", access = JsonProperty.Access.WRITE_ONLY) + private Integer numJobsCanceled; + + /** + * the number of jobs in this pipeline that have succeeded. + */ + @JsonProperty(value = "numJobsSucceeded", access = JsonProperty.Access.WRITE_ONLY) + private Integer numJobsSucceeded; + + /** + * the number of job execution hours that resulted in failed jobs. + */ + @JsonProperty(value = "auHoursFailed", access = JsonProperty.Access.WRITE_ONLY) + private Double auHoursFailed; + + /** + * the number of job execution hours that resulted in canceled jobs. + */ + @JsonProperty(value = "auHoursCanceled", access = JsonProperty.Access.WRITE_ONLY) + private Double auHoursCanceled; + + /** + * the number of job execution hours that resulted in successful jobs. + */ + @JsonProperty(value = "auHoursSucceeded", access = JsonProperty.Access.WRITE_ONLY) + private Double auHoursSucceeded; + + /** + * the last time a job in this pipeline was submitted. + */ + @JsonProperty(value = "lastSubmitTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastSubmitTime; + + /** + * the list of run identifiers representing each run of this pipeline. + */ + @JsonProperty(value = "runs", access = JsonProperty.Access.WRITE_ONLY) + private List runs; + + /** + * the list of recurrence identifiers representing each recurrence in this + * pipeline. + */ + @JsonProperty(value = "recurrences", access = JsonProperty.Access.WRITE_ONLY) + private List recurrences; + + /** + * Get the job relationship pipeline identifier (a GUID). + * + * @return the pipelineId value + */ + public UUID pipelineId() { + return this.pipelineId; + } + + /** + * Get the friendly name of the job relationship pipeline, which does not need to be unique. + * + * @return the pipelineName value + */ + public String pipelineName() { + return this.pipelineName; + } + + /** + * Get the pipeline uri, unique, links to the originating service for this pipeline. + * + * @return the pipelineUri value + */ + public String pipelineUri() { + return this.pipelineUri; + } + + /** + * Get the number of jobs in this pipeline that have failed. + * + * @return the numJobsFailed value + */ + public Integer numJobsFailed() { + return this.numJobsFailed; + } + + /** + * Get the number of jobs in this pipeline that have been canceled. + * + * @return the numJobsCanceled value + */ + public Integer numJobsCanceled() { + return this.numJobsCanceled; + } + + /** + * Get the number of jobs in this pipeline that have succeeded. + * + * @return the numJobsSucceeded value + */ + public Integer numJobsSucceeded() { + return this.numJobsSucceeded; + } + + /** + * Get the number of job execution hours that resulted in failed jobs. + * + * @return the auHoursFailed value + */ + public Double auHoursFailed() { + return this.auHoursFailed; + } + + /** + * Get the number of job execution hours that resulted in canceled jobs. + * + * @return the auHoursCanceled value + */ + public Double auHoursCanceled() { + return this.auHoursCanceled; + } + + /** + * Get the number of job execution hours that resulted in successful jobs. + * + * @return the auHoursSucceeded value + */ + public Double auHoursSucceeded() { + return this.auHoursSucceeded; + } + + /** + * Get the last time a job in this pipeline was submitted. + * + * @return the lastSubmitTime value + */ + public DateTime lastSubmitTime() { + return this.lastSubmitTime; + } + + /** + * Get the list of run identifiers representing each run of this pipeline. + * + * @return the runs value + */ + public List runs() { + return this.runs; + } + + /** + * Get the list of recurrence identifiers representing each recurrence in this pipeline. + * + * @return the recurrences value + */ + public List recurrences() { + return this.recurrences; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineRunInformation.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineRunInformation.java new file mode 100644 index 000000000000..66549c890405 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobPipelineRunInformation.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Run info for a specific job pipeline. + */ +public class JobPipelineRunInformation { + /** + * the run identifier of an instance of pipeline executions (a GUID). + */ + @JsonProperty(value = "runId", access = JsonProperty.Access.WRITE_ONLY) + private UUID runId; + + /** + * the time this instance was last submitted. + */ + @JsonProperty(value = "lastSubmitTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastSubmitTime; + + /** + * Get the run identifier of an instance of pipeline executions (a GUID). + * + * @return the runId value + */ + public UUID runId() { + return this.runId; + } + + /** + * Get the time this instance was last submitted. + * + * @return the lastSubmitTime value + */ + public DateTime lastSubmitTime() { + return this.lastSubmitTime; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobProperties.java new file mode 100644 index 000000000000..cff29061fcd1 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobProperties.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * The common Data Lake Analytics job properties. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("JobProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "USql", value = USqlJobProperties.class), + @JsonSubTypes.Type(name = "Hive", value = HiveJobProperties.class) +}) +public class JobProperties { + /** + * Gets or sets the runtime version of the U-SQL engine to use. + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /** + * Gets or sets the U-SQL script to run. + */ + @JsonProperty(value = "script", required = true) + private String script; + + /** + * Get gets or sets the runtime version of the U-SQL engine to use. + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set gets or sets the runtime version of the U-SQL engine to use. + * + * @param runtimeVersion the runtimeVersion value to set + * @return the JobProperties object itself. + */ + public JobProperties withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get gets or sets the U-SQL script to run. + * + * @return the script value + */ + public String script() { + return this.script; + } + + /** + * Set gets or sets the U-SQL script to run. + * + * @param script the script value to set + * @return the JobProperties object itself. + */ + public JobProperties withScript(String script) { + this.script = script; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRecurrenceInformation.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRecurrenceInformation.java new file mode 100644 index 000000000000..8f80436ff538 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRecurrenceInformation.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Recurrence job information for a specific recurrence. + */ +public class JobRecurrenceInformation { + /** + * the recurrence identifier (a GUID), unique per activity/script, + * regardless of iterations. This is something to link different + * occurrences of the same job together. + */ + @JsonProperty(value = "recurrenceId", access = JsonProperty.Access.WRITE_ONLY) + private UUID recurrenceId; + + /** + * the recurrence name, user friendly name for the correlation between + * jobs. + */ + @JsonProperty(value = "recurrenceName", access = JsonProperty.Access.WRITE_ONLY) + private String recurrenceName; + + /** + * the number of jobs in this recurrence that have failed. + */ + @JsonProperty(value = "numJobsFailed", access = JsonProperty.Access.WRITE_ONLY) + private Integer numJobsFailed; + + /** + * the number of jobs in this recurrence that have been canceled. + */ + @JsonProperty(value = "numJobsCanceled", access = JsonProperty.Access.WRITE_ONLY) + private Integer numJobsCanceled; + + /** + * the number of jobs in this recurrence that have succeeded. + */ + @JsonProperty(value = "numJobsSucceeded", access = JsonProperty.Access.WRITE_ONLY) + private Integer numJobsSucceeded; + + /** + * the number of job execution hours that resulted in failed jobs. + */ + @JsonProperty(value = "auHoursFailed", access = JsonProperty.Access.WRITE_ONLY) + private Double auHoursFailed; + + /** + * the number of job execution hours that resulted in canceled jobs. + */ + @JsonProperty(value = "auHoursCanceled", access = JsonProperty.Access.WRITE_ONLY) + private Double auHoursCanceled; + + /** + * the number of job execution hours that resulted in successful jobs. + */ + @JsonProperty(value = "auHoursSucceeded", access = JsonProperty.Access.WRITE_ONLY) + private Double auHoursSucceeded; + + /** + * the last time a job in this recurrence was submitted. + */ + @JsonProperty(value = "lastSubmitTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastSubmitTime; + + /** + * Get the recurrence identifier (a GUID), unique per activity/script, regardless of iterations. This is something to link different occurrences of the same job together. + * + * @return the recurrenceId value + */ + public UUID recurrenceId() { + return this.recurrenceId; + } + + /** + * Get the recurrence name, user friendly name for the correlation between jobs. + * + * @return the recurrenceName value + */ + public String recurrenceName() { + return this.recurrenceName; + } + + /** + * Get the number of jobs in this recurrence that have failed. + * + * @return the numJobsFailed value + */ + public Integer numJobsFailed() { + return this.numJobsFailed; + } + + /** + * Get the number of jobs in this recurrence that have been canceled. + * + * @return the numJobsCanceled value + */ + public Integer numJobsCanceled() { + return this.numJobsCanceled; + } + + /** + * Get the number of jobs in this recurrence that have succeeded. + * + * @return the numJobsSucceeded value + */ + public Integer numJobsSucceeded() { + return this.numJobsSucceeded; + } + + /** + * Get the number of job execution hours that resulted in failed jobs. + * + * @return the auHoursFailed value + */ + public Double auHoursFailed() { + return this.auHoursFailed; + } + + /** + * Get the number of job execution hours that resulted in canceled jobs. + * + * @return the auHoursCanceled value + */ + public Double auHoursCanceled() { + return this.auHoursCanceled; + } + + /** + * Get the number of job execution hours that resulted in successful jobs. + * + * @return the auHoursSucceeded value + */ + public Double auHoursSucceeded() { + return this.auHoursSucceeded; + } + + /** + * Get the last time a job in this recurrence was submitted. + * + * @return the lastSubmitTime value + */ + public DateTime lastSubmitTime() { + return this.lastSubmitTime; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRelationshipProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRelationshipProperties.java new file mode 100644 index 000000000000..791184875c19 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobRelationshipProperties.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Job relationship information properties including pipeline information, + * correlation information, etc. + */ +public class JobRelationshipProperties { + /** + * the job relationship pipeline identifier (a GUID). + */ + @JsonProperty(value = "pipelineId") + private UUID pipelineId; + + /** + * the friendly name of the job relationship pipeline, which does not need + * to be unique. + */ + @JsonProperty(value = "pipelineName") + private String pipelineName; + + /** + * the pipeline uri, unique, links to the originating service for this + * pipeline. + */ + @JsonProperty(value = "pipelineUri") + private String pipelineUri; + + /** + * the run identifier (a GUID), unique identifier of the iteration of this + * pipeline. + */ + @JsonProperty(value = "runId") + private UUID runId; + + /** + * the recurrence identifier (a GUID), unique per activity/script, + * regardless of iterations. This is something to link different + * occurrences of the same job together. + */ + @JsonProperty(value = "recurrenceId", required = true) + private UUID recurrenceId; + + /** + * the recurrence name, user friendly name for the correlation between + * jobs. + */ + @JsonProperty(value = "recurrenceName") + private String recurrenceName; + + /** + * Get the job relationship pipeline identifier (a GUID). + * + * @return the pipelineId value + */ + public UUID pipelineId() { + return this.pipelineId; + } + + /** + * Set the job relationship pipeline identifier (a GUID). + * + * @param pipelineId the pipelineId value to set + * @return the JobRelationshipProperties object itself. + */ + public JobRelationshipProperties withPipelineId(UUID pipelineId) { + this.pipelineId = pipelineId; + return this; + } + + /** + * Get the friendly name of the job relationship pipeline, which does not need to be unique. + * + * @return the pipelineName value + */ + public String pipelineName() { + return this.pipelineName; + } + + /** + * Set the friendly name of the job relationship pipeline, which does not need to be unique. + * + * @param pipelineName the pipelineName value to set + * @return the JobRelationshipProperties object itself. + */ + public JobRelationshipProperties withPipelineName(String pipelineName) { + this.pipelineName = pipelineName; + return this; + } + + /** + * Get the pipeline uri, unique, links to the originating service for this pipeline. + * + * @return the pipelineUri value + */ + public String pipelineUri() { + return this.pipelineUri; + } + + /** + * Set the pipeline uri, unique, links to the originating service for this pipeline. + * + * @param pipelineUri the pipelineUri value to set + * @return the JobRelationshipProperties object itself. + */ + public JobRelationshipProperties withPipelineUri(String pipelineUri) { + this.pipelineUri = pipelineUri; + return this; + } + + /** + * Get the run identifier (a GUID), unique identifier of the iteration of this pipeline. + * + * @return the runId value + */ + public UUID runId() { + return this.runId; + } + + /** + * Set the run identifier (a GUID), unique identifier of the iteration of this pipeline. + * + * @param runId the runId value to set + * @return the JobRelationshipProperties object itself. + */ + public JobRelationshipProperties withRunId(UUID runId) { + this.runId = runId; + return this; + } + + /** + * Get the recurrence identifier (a GUID), unique per activity/script, regardless of iterations. This is something to link different occurrences of the same job together. + * + * @return the recurrenceId value + */ + public UUID recurrenceId() { + return this.recurrenceId; + } + + /** + * Set the recurrence identifier (a GUID), unique per activity/script, regardless of iterations. This is something to link different occurrences of the same job together. + * + * @param recurrenceId the recurrenceId value to set + * @return the JobRelationshipProperties object itself. + */ + public JobRelationshipProperties withRecurrenceId(UUID recurrenceId) { + this.recurrenceId = recurrenceId; + return this; + } + + /** + * Get the recurrence name, user friendly name for the correlation between jobs. + * + * @return the recurrenceName value + */ + public String recurrenceName() { + return this.recurrenceName; + } + + /** + * Set the recurrence name, user friendly name for the correlation between jobs. + * + * @param recurrenceName the recurrenceName value to set + * @return the JobRelationshipProperties object itself. + */ + public JobRelationshipProperties withRecurrenceName(String recurrenceName) { + this.recurrenceName = recurrenceName; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResource.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResource.java new file mode 100644 index 000000000000..d160aef9a6d4 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResource.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Data Lake Analytics U-SQL job resources. + */ +public class JobResource { + /** + * Gets or set the name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Gets or sets the path to the resource. + */ + @JsonProperty(value = "resourcePath") + private String resourcePath; + + /** + * Gets or sets the job resource type. Possible values include: + * 'VertexResource', 'StatisticsResource'. + */ + @JsonProperty(value = "type") + private JobResourceType type; + + /** + * Get gets or set the name of the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set gets or set the name of the resource. + * + * @param name the name value to set + * @return the JobResource object itself. + */ + public JobResource withName(String name) { + this.name = name; + return this; + } + + /** + * Get gets or sets the path to the resource. + * + * @return the resourcePath value + */ + public String resourcePath() { + return this.resourcePath; + } + + /** + * Set gets or sets the path to the resource. + * + * @param resourcePath the resourcePath value to set + * @return the JobResource object itself. + */ + public JobResource withResourcePath(String resourcePath) { + this.resourcePath = resourcePath; + return this; + } + + /** + * Get gets or sets the job resource type. Possible values include: 'VertexResource', 'StatisticsResource'. + * + * @return the type value + */ + public JobResourceType type() { + return this.type; + } + + /** + * Set gets or sets the job resource type. Possible values include: 'VertexResource', 'StatisticsResource'. + * + * @param type the type value to set + * @return the JobResource object itself. + */ + public JobResource withType(JobResourceType type) { + this.type = type; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResourceType.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResourceType.java new file mode 100644 index 000000000000..72cb6c4ee053 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResourceType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for JobResourceType. + */ +public enum JobResourceType { + /** Enum value VertexResource. */ + VERTEX_RESOURCE("VertexResource"), + + /** Enum value StatisticsResource. */ + STATISTICS_RESOURCE("StatisticsResource"); + + /** The actual serialized value for a JobResourceType instance. */ + private String value; + + JobResourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a JobResourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed JobResourceType object, or null if unable to parse. + */ + @JsonCreator + public static JobResourceType fromString(String value) { + JobResourceType[] items = JobResourceType.values(); + for (JobResourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResult.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResult.java new file mode 100644 index 000000000000..adf3c463431d --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobResult.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for JobResult. + */ +public enum JobResult { + /** Enum value None. */ + NONE("None"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Cancelled. */ + CANCELLED("Cancelled"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a JobResult instance. */ + private String value; + + JobResult(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a JobResult instance. + * + * @param value the serialized value to parse. + * @return the parsed JobResult object, or null if unable to parse. + */ + @JsonCreator + public static JobResult fromString(String value) { + JobResult[] items = JobResult.values(); + for (JobResult item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobState.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobState.java new file mode 100644 index 000000000000..0403554c8a54 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobState.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for JobState. + */ +public enum JobState { + /** Enum value Accepted. */ + ACCEPTED("Accepted"), + + /** Enum value Compiling. */ + COMPILING("Compiling"), + + /** Enum value Ended. */ + ENDED("Ended"), + + /** Enum value New. */ + NEW("New"), + + /** Enum value Queued. */ + QUEUED("Queued"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value Scheduling. */ + SCHEDULING("Scheduling"), + + /** Enum value Starting. */ + STARTING("Starting"), + + /** Enum value Paused. */ + PAUSED("Paused"), + + /** Enum value WaitingForCapacity. */ + WAITING_FOR_CAPACITY("WaitingForCapacity"); + + /** The actual serialized value for a JobState instance. */ + private String value; + + JobState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a JobState instance. + * + * @param value the serialized value to parse. + * @return the parsed JobState object, or null if unable to parse. + */ + @JsonCreator + public static JobState fromString(String value) { + JobState[] items = JobState.values(); + for (JobState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStateAuditRecord.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStateAuditRecord.java new file mode 100644 index 000000000000..36b3b23c137e --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStateAuditRecord.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Data Lake Analytics U-SQL job state audit records for tracking the + * lifecycle of a job. + */ +public class JobStateAuditRecord { + /** + * Gets the new state the job is in. + */ + @JsonProperty(value = "newState", access = JsonProperty.Access.WRITE_ONLY) + private String newState; + + /** + * Gets the time stamp that the state change took place. + */ + @JsonProperty(value = "timeStamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime timeStamp; + + /** + * Gets the user who requests the change. + */ + @JsonProperty(value = "requestedByUser", access = JsonProperty.Access.WRITE_ONLY) + private String requestedByUser; + + /** + * Gets the details of the audit log. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private String details; + + /** + * Get gets the new state the job is in. + * + * @return the newState value + */ + public String newState() { + return this.newState; + } + + /** + * Get gets the time stamp that the state change took place. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Get gets the user who requests the change. + * + * @return the requestedByUser value + */ + public String requestedByUser() { + return this.requestedByUser; + } + + /** + * Get gets the details of the audit log. + * + * @return the details value + */ + public String details() { + return this.details; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatistics.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatistics.java new file mode 100644 index 000000000000..9c043e062367 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatistics.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Data Lake Analytics U-SQL job execution statistics. + */ +public class JobStatistics { + /** + * Gets the last update time for the statistics. + */ + @JsonProperty(value = "lastUpdateTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastUpdateTimeUtc; + + /** + * Gets the list of stages for the job. + */ + @JsonProperty(value = "stages", access = JsonProperty.Access.WRITE_ONLY) + private List stages; + + /** + * Get gets the last update time for the statistics. + * + * @return the lastUpdateTimeUtc value + */ + public DateTime lastUpdateTimeUtc() { + return this.lastUpdateTimeUtc; + } + + /** + * Get gets the list of stages for the job. + * + * @return the stages value + */ + public List stages() { + return this.stages; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertex.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertex.java new file mode 100644 index 000000000000..894af7ea8ccd --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertex.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import org.joda.time.Period; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The detailed information for a vertex. + */ +public class JobStatisticsVertex { + /** + * The name of the vertex. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The id of the vertex. + */ + @JsonProperty(value = "vertexId", access = JsonProperty.Access.WRITE_ONLY) + private UUID vertexId; + + /** + * The amount of execution time of the vertex. + */ + @JsonProperty(value = "executionTime", access = JsonProperty.Access.WRITE_ONLY) + private Period executionTime; + + /** + * The amount of data read of the vertex, in bytes. + */ + @JsonProperty(value = "dataRead", access = JsonProperty.Access.WRITE_ONLY) + private Long dataRead; + + /** + * The amount of peak memory usage of the vertex, in bytes. + */ + @JsonProperty(value = "peakMemUsage", access = JsonProperty.Access.WRITE_ONLY) + private Long peakMemUsage; + + /** + * Get the name of the vertex. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the id of the vertex. + * + * @return the vertexId value + */ + public UUID vertexId() { + return this.vertexId; + } + + /** + * Get the amount of execution time of the vertex. + * + * @return the executionTime value + */ + public Period executionTime() { + return this.executionTime; + } + + /** + * Get the amount of data read of the vertex, in bytes. + * + * @return the dataRead value + */ + public Long dataRead() { + return this.dataRead; + } + + /** + * Get the amount of peak memory usage of the vertex, in bytes. + * + * @return the peakMemUsage value + */ + public Long peakMemUsage() { + return this.peakMemUsage; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertexStage.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertexStage.java new file mode 100644 index 000000000000..e0ae48a2cb9d --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobStatisticsVertexStage.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Data Lake Analytics U-SQL job statistics vertex stage information. + */ +public class JobStatisticsVertexStage { + /** + * Gets the amount of data read, in bytes. + */ + @JsonProperty(value = "dataRead", access = JsonProperty.Access.WRITE_ONLY) + private Long dataRead; + + /** + * Gets the amount of data read across multiple pods, in bytes. + */ + @JsonProperty(value = "dataReadCrossPod", access = JsonProperty.Access.WRITE_ONLY) + private Long dataReadCrossPod; + + /** + * Gets the amount of data read in one pod, in bytes. + */ + @JsonProperty(value = "dataReadIntraPod", access = JsonProperty.Access.WRITE_ONLY) + private Long dataReadIntraPod; + + /** + * Gets the amount of data remaining to be read, in bytes. + */ + @JsonProperty(value = "dataToRead", access = JsonProperty.Access.WRITE_ONLY) + private Long dataToRead; + + /** + * Gets the amount of data written, in bytes. + */ + @JsonProperty(value = "dataWritten", access = JsonProperty.Access.WRITE_ONLY) + private Long dataWritten; + + /** + * Gets the number of duplicates that were discarded. + */ + @JsonProperty(value = "duplicateDiscardCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer duplicateDiscardCount; + + /** + * Gets the number of failures that occured in this stage. + */ + @JsonProperty(value = "failedCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer failedCount; + + /** + * Gets the maximum amount of data read in a single vertex, in bytes. + */ + @JsonProperty(value = "maxVertexDataRead", access = JsonProperty.Access.WRITE_ONLY) + private Long maxVertexDataRead; + + /** + * Gets the minimum amount of data read in a single vertex, in bytes. + */ + @JsonProperty(value = "minVertexDataRead", access = JsonProperty.Access.WRITE_ONLY) + private Long minVertexDataRead; + + /** + * Gets the number of read failures in this stage. + */ + @JsonProperty(value = "readFailureCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer readFailureCount; + + /** + * Gets the number of vertices that were revoked during this stage. + */ + @JsonProperty(value = "revocationCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer revocationCount; + + /** + * Gets the number of currently running vertices in this stage. + */ + @JsonProperty(value = "runningCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer runningCount; + + /** + * Gets the number of currently scheduled vertices in this stage. + */ + @JsonProperty(value = "scheduledCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer scheduledCount; + + /** + * Gets the name of this stage in job execution. + */ + @JsonProperty(value = "stageName", access = JsonProperty.Access.WRITE_ONLY) + private String stageName; + + /** + * Gets the number of vertices that succeeded in this stage. + */ + @JsonProperty(value = "succeededCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer succeededCount; + + /** + * Gets the amount of temporary data written, in bytes. + */ + @JsonProperty(value = "tempDataWritten", access = JsonProperty.Access.WRITE_ONLY) + private Long tempDataWritten; + + /** + * Gets the total vertex count for this stage. + */ + @JsonProperty(value = "totalCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalCount; + + /** + * Gets the amount of time that failed vertices took up in this stage. + */ + @JsonProperty(value = "totalFailedTime", access = JsonProperty.Access.WRITE_ONLY) + private String totalFailedTime; + + /** + * Gets the current progress of this stage, as a percentage. + */ + @JsonProperty(value = "totalProgress", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalProgress; + + /** + * Gets the amount of time all successful vertices took in this stage. + */ + @JsonProperty(value = "totalSucceededTime", access = JsonProperty.Access.WRITE_ONLY) + private String totalSucceededTime; + + /** + * Get gets the amount of data read, in bytes. + * + * @return the dataRead value + */ + public Long dataRead() { + return this.dataRead; + } + + /** + * Get gets the amount of data read across multiple pods, in bytes. + * + * @return the dataReadCrossPod value + */ + public Long dataReadCrossPod() { + return this.dataReadCrossPod; + } + + /** + * Get gets the amount of data read in one pod, in bytes. + * + * @return the dataReadIntraPod value + */ + public Long dataReadIntraPod() { + return this.dataReadIntraPod; + } + + /** + * Get gets the amount of data remaining to be read, in bytes. + * + * @return the dataToRead value + */ + public Long dataToRead() { + return this.dataToRead; + } + + /** + * Get gets the amount of data written, in bytes. + * + * @return the dataWritten value + */ + public Long dataWritten() { + return this.dataWritten; + } + + /** + * Get gets the number of duplicates that were discarded. + * + * @return the duplicateDiscardCount value + */ + public Integer duplicateDiscardCount() { + return this.duplicateDiscardCount; + } + + /** + * Get gets the number of failures that occured in this stage. + * + * @return the failedCount value + */ + public Integer failedCount() { + return this.failedCount; + } + + /** + * Get gets the maximum amount of data read in a single vertex, in bytes. + * + * @return the maxVertexDataRead value + */ + public Long maxVertexDataRead() { + return this.maxVertexDataRead; + } + + /** + * Get gets the minimum amount of data read in a single vertex, in bytes. + * + * @return the minVertexDataRead value + */ + public Long minVertexDataRead() { + return this.minVertexDataRead; + } + + /** + * Get gets the number of read failures in this stage. + * + * @return the readFailureCount value + */ + public Integer readFailureCount() { + return this.readFailureCount; + } + + /** + * Get gets the number of vertices that were revoked during this stage. + * + * @return the revocationCount value + */ + public Integer revocationCount() { + return this.revocationCount; + } + + /** + * Get gets the number of currently running vertices in this stage. + * + * @return the runningCount value + */ + public Integer runningCount() { + return this.runningCount; + } + + /** + * Get gets the number of currently scheduled vertices in this stage. + * + * @return the scheduledCount value + */ + public Integer scheduledCount() { + return this.scheduledCount; + } + + /** + * Get gets the name of this stage in job execution. + * + * @return the stageName value + */ + public String stageName() { + return this.stageName; + } + + /** + * Get gets the number of vertices that succeeded in this stage. + * + * @return the succeededCount value + */ + public Integer succeededCount() { + return this.succeededCount; + } + + /** + * Get gets the amount of temporary data written, in bytes. + * + * @return the tempDataWritten value + */ + public Long tempDataWritten() { + return this.tempDataWritten; + } + + /** + * Get gets the total vertex count for this stage. + * + * @return the totalCount value + */ + public Integer totalCount() { + return this.totalCount; + } + + /** + * Get gets the amount of time that failed vertices took up in this stage. + * + * @return the totalFailedTime value + */ + public String totalFailedTime() { + return this.totalFailedTime; + } + + /** + * Get gets the current progress of this stage, as a percentage. + * + * @return the totalProgress value + */ + public Integer totalProgress() { + return this.totalProgress; + } + + /** + * Get gets the amount of time all successful vertices took in this stage. + * + * @return the totalSucceededTime value + */ + public String totalSucceededTime() { + return this.totalSucceededTime; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobType.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobType.java new file mode 100644 index 000000000000..5cb73304d82e --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/JobType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for JobType. + */ +public enum JobType { + /** Enum value USql. */ + USQL("USql"), + + /** Enum value Hive. */ + HIVE("Hive"); + + /** The actual serialized value for a JobType instance. */ + private String value; + + JobType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a JobType instance. + * + * @param value the serialized value to parse. + * @return the parsed JobType object, or null if unable to parse. + */ + @JsonCreator + public static JobType fromString(String value) { + JobType[] items = JobType.values(); + for (JobType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PageImpl.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PageImpl.java new file mode 100644 index 000000000000..df7b95e40e2d --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PermissionType.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PermissionType.java new file mode 100644 index 000000000000..e609feb13239 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/PermissionType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PermissionType. + */ +public final class PermissionType extends ExpandableStringEnum { + /** Static value None for PermissionType. */ + public static final PermissionType NONE = fromString("None"); + + /** Static value Use for PermissionType. */ + public static final PermissionType USE = fromString("Use"); + + /** Static value Create for PermissionType. */ + public static final PermissionType CREATE = fromString("Create"); + + /** Static value Drop for PermissionType. */ + public static final PermissionType DROP = fromString("Drop"); + + /** Static value Alter for PermissionType. */ + public static final PermissionType ALTER = fromString("Alter"); + + /** Static value Write for PermissionType. */ + public static final PermissionType WRITE = fromString("Write"); + + /** Static value All for PermissionType. */ + public static final PermissionType ALL = fromString("All"); + + /** + * Creates or finds a PermissionType from its string representation. + * @param name a name to look for + * @return the corresponding PermissionType + */ + @JsonCreator + public static PermissionType fromString(String name) { + return fromString(name, PermissionType.class); + } + + /** + * @return known PermissionType values + */ + public static Collection values() { + return values(PermissionType.class); + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ResourceUsageStatistics.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ResourceUsageStatistics.java new file mode 100644 index 000000000000..ffc76e82771a --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ResourceUsageStatistics.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The statistics information for resource usage. + */ +public class ResourceUsageStatistics { + /** + * The average value. + */ + @JsonProperty(value = "average", access = JsonProperty.Access.WRITE_ONLY) + private Double average; + + /** + * The minimum value. + */ + @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY) + private Long minimum; + + /** + * The maximum value. + */ + @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) + private Long maximum; + + /** + * Get the average value. + * + * @return the average value + */ + public Double average() { + return this.average; + } + + /** + * Get the minimum value. + * + * @return the minimum value + */ + public Long minimum() { + return this.minimum; + } + + /** + * Get the maximum value. + * + * @return the maximum value + */ + public Long maximum() { + return this.maximum; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobProperties.java new file mode 100644 index 000000000000..421cdb8c9f2e --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobProperties.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import org.joda.time.Period; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Scope job properties used when submitting and retrieving Scope jobs. (Only + * for use internally with Scope job type.). + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Scope") +public class ScopeJobProperties extends JobProperties { + /** + * The list of resources that are required by the job. + */ + @JsonProperty(value = "resources", access = JsonProperty.Access.WRITE_ONLY) + private List resources; + + /** + * The algebra file path after the job has completed. + */ + @JsonProperty(value = "userAlgebraPath", access = JsonProperty.Access.WRITE_ONLY) + private String userAlgebraPath; + + /** + * The list of email addresses, separated by semi-colons, to notify when + * the job reaches a terminal state. + */ + @JsonProperty(value = "notifier") + private String notifier; + + /** + * The total time this job spent compiling. This value should not be set by + * the user and will be ignored if it is. + */ + @JsonProperty(value = "totalCompilationTime", access = JsonProperty.Access.WRITE_ONLY) + private Period totalCompilationTime; + + /** + * The total time this job spent queued. This value should not be set by + * the user and will be ignored if it is. + */ + @JsonProperty(value = "totalQueuedTime", access = JsonProperty.Access.WRITE_ONLY) + private Period totalQueuedTime; + + /** + * The total time this job spent executing. This value should not be set by + * the user and will be ignored if it is. + */ + @JsonProperty(value = "totalRunningTime", access = JsonProperty.Access.WRITE_ONLY) + private Period totalRunningTime; + + /** + * The total time this job spent paused. This value should not be set by + * the user and will be ignored if it is. + */ + @JsonProperty(value = "totalPausedTime", access = JsonProperty.Access.WRITE_ONLY) + private Period totalPausedTime; + + /** + * The ID used to identify the job manager coordinating job execution. This + * value should not be set by the user and will be ignored if it is. + */ + @JsonProperty(value = "rootProcessNodeId", access = JsonProperty.Access.WRITE_ONLY) + private String rootProcessNodeId; + + /** + * The ID used to identify the yarn application executing the job. This + * value should not be set by the user and will be ignored if it is. + */ + @JsonProperty(value = "yarnApplicationId", access = JsonProperty.Access.WRITE_ONLY) + private String yarnApplicationId; + + /** + * Get the list of resources that are required by the job. + * + * @return the resources value + */ + public List resources() { + return this.resources; + } + + /** + * Get the algebra file path after the job has completed. + * + * @return the userAlgebraPath value + */ + public String userAlgebraPath() { + return this.userAlgebraPath; + } + + /** + * Get the list of email addresses, separated by semi-colons, to notify when the job reaches a terminal state. + * + * @return the notifier value + */ + public String notifier() { + return this.notifier; + } + + /** + * Set the list of email addresses, separated by semi-colons, to notify when the job reaches a terminal state. + * + * @param notifier the notifier value to set + * @return the ScopeJobProperties object itself. + */ + public ScopeJobProperties withNotifier(String notifier) { + this.notifier = notifier; + return this; + } + + /** + * Get the total time this job spent compiling. This value should not be set by the user and will be ignored if it is. + * + * @return the totalCompilationTime value + */ + public Period totalCompilationTime() { + return this.totalCompilationTime; + } + + /** + * Get the total time this job spent queued. This value should not be set by the user and will be ignored if it is. + * + * @return the totalQueuedTime value + */ + public Period totalQueuedTime() { + return this.totalQueuedTime; + } + + /** + * Get the total time this job spent executing. This value should not be set by the user and will be ignored if it is. + * + * @return the totalRunningTime value + */ + public Period totalRunningTime() { + return this.totalRunningTime; + } + + /** + * Get the total time this job spent paused. This value should not be set by the user and will be ignored if it is. + * + * @return the totalPausedTime value + */ + public Period totalPausedTime() { + return this.totalPausedTime; + } + + /** + * Get the ID used to identify the job manager coordinating job execution. This value should not be set by the user and will be ignored if it is. + * + * @return the rootProcessNodeId value + */ + public String rootProcessNodeId() { + return this.rootProcessNodeId; + } + + /** + * Get the ID used to identify the yarn application executing the job. This value should not be set by the user and will be ignored if it is. + * + * @return the yarnApplicationId value + */ + public String yarnApplicationId() { + return this.yarnApplicationId; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobResource.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobResource.java new file mode 100644 index 000000000000..5c72a7eae6f2 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/ScopeJobResource.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Scope job resources. (Only for use internally with Scope job type.). + */ +public class ScopeJobResource { + /** + * The name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The path to the resource. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Get the name of the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource. + * + * @param name the name value to set + * @return the ScopeJobResource object itself. + */ + public ScopeJobResource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the path to the resource. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the path to the resource. + * + * @param path the path value to set + * @return the ScopeJobResource object itself. + */ + public ScopeJobResource withPath(String path) { + this.path = path; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/SeverityTypes.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/SeverityTypes.java new file mode 100644 index 000000000000..cb8e135c29de --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/SeverityTypes.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SeverityTypes. + */ +public enum SeverityTypes { + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a SeverityTypes instance. */ + private String value; + + SeverityTypes(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SeverityTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed SeverityTypes object, or null if unable to parse. + */ + @JsonCreator + public static SeverityTypes fromString(String value) { + SeverityTypes[] items = SeverityTypes.values(); + for (SeverityTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/TypeFieldInfo.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/TypeFieldInfo.java new file mode 100644 index 000000000000..240b072db3e7 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/TypeFieldInfo.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog type field information item. + */ +public class TypeFieldInfo { + /** + * the name of the field associated with this type. + */ + @JsonProperty(value = "name") + private String name; + + /** + * the type of the field. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the name of the field associated with this type. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the field associated with this type. + * + * @param name the name value to set + * @return the TypeFieldInfo object itself. + */ + public TypeFieldInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type of the field. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of the field. + * + * @param type the type value to set + * @return the TypeFieldInfo object itself. + */ + public TypeFieldInfo withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssembly.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssembly.java new file mode 100644 index 000000000000..4d016e3de06d --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssembly.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL Assembly. + */ +public class USqlAssembly extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the assembly. + */ + @JsonProperty(value = "assemblyName") + private String name; + + /** + * the name of the CLR. + */ + @JsonProperty(value = "clrName") + private String clrName; + + /** + * the switch indicating if this assembly is visible or not. + */ + @JsonProperty(value = "isVisible") + private Boolean isVisible; + + /** + * the switch indicating if this assembly is user defined or not. + */ + @JsonProperty(value = "isUserDefined") + private Boolean isUserDefined; + + /** + * the list of files associated with the assembly. + */ + @JsonProperty(value = "files") + private List files; + + /** + * the list of dependencies associated with the assembly. + */ + @JsonProperty(value = "dependencies") + private List dependencies; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlAssembly object itself. + */ + public USqlAssembly withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the assembly. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the assembly. + * + * @param name the name value to set + * @return the USqlAssembly object itself. + */ + public USqlAssembly withName(String name) { + this.name = name; + return this; + } + + /** + * Get the name of the CLR. + * + * @return the clrName value + */ + public String clrName() { + return this.clrName; + } + + /** + * Set the name of the CLR. + * + * @param clrName the clrName value to set + * @return the USqlAssembly object itself. + */ + public USqlAssembly withClrName(String clrName) { + this.clrName = clrName; + return this; + } + + /** + * Get the switch indicating if this assembly is visible or not. + * + * @return the isVisible value + */ + public Boolean isVisible() { + return this.isVisible; + } + + /** + * Set the switch indicating if this assembly is visible or not. + * + * @param isVisible the isVisible value to set + * @return the USqlAssembly object itself. + */ + public USqlAssembly withIsVisible(Boolean isVisible) { + this.isVisible = isVisible; + return this; + } + + /** + * Get the switch indicating if this assembly is user defined or not. + * + * @return the isUserDefined value + */ + public Boolean isUserDefined() { + return this.isUserDefined; + } + + /** + * Set the switch indicating if this assembly is user defined or not. + * + * @param isUserDefined the isUserDefined value to set + * @return the USqlAssembly object itself. + */ + public USqlAssembly withIsUserDefined(Boolean isUserDefined) { + this.isUserDefined = isUserDefined; + return this; + } + + /** + * Get the list of files associated with the assembly. + * + * @return the files value + */ + public List files() { + return this.files; + } + + /** + * Set the list of files associated with the assembly. + * + * @param files the files value to set + * @return the USqlAssembly object itself. + */ + public USqlAssembly withFiles(List files) { + this.files = files; + return this; + } + + /** + * Get the list of dependencies associated with the assembly. + * + * @return the dependencies value + */ + public List dependencies() { + return this.dependencies; + } + + /** + * Set the list of dependencies associated with the assembly. + * + * @param dependencies the dependencies value to set + * @return the USqlAssembly object itself. + */ + public USqlAssembly withDependencies(List dependencies) { + this.dependencies = dependencies; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyClr.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyClr.java new file mode 100644 index 000000000000..b3b2a64b5be3 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyClr.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL assembly CLR item. + */ +public class USqlAssemblyClr extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the assembly. + */ + @JsonProperty(value = "assemblyClrName") + private String name; + + /** + * the name of the CLR. + */ + @JsonProperty(value = "clrName") + private String clrName; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlAssemblyClr object itself. + */ + public USqlAssemblyClr withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the assembly. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the assembly. + * + * @param name the name value to set + * @return the USqlAssemblyClr object itself. + */ + public USqlAssemblyClr withName(String name) { + this.name = name; + return this; + } + + /** + * Get the name of the CLR. + * + * @return the clrName value + */ + public String clrName() { + return this.clrName; + } + + /** + * Set the name of the CLR. + * + * @param clrName the clrName value to set + * @return the USqlAssemblyClr object itself. + */ + public USqlAssemblyClr withClrName(String clrName) { + this.clrName = clrName; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyDependencyInfo.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyDependencyInfo.java new file mode 100644 index 000000000000..c4f200cc1099 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyDependencyInfo.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL dependency information item. + */ +public class USqlAssemblyDependencyInfo { + /** + * the EntityId of the dependency. + */ + @JsonProperty(value = "entityId") + private EntityId entityId; + + /** + * Get the EntityId of the dependency. + * + * @return the entityId value + */ + public EntityId entityId() { + return this.entityId; + } + + /** + * Set the EntityId of the dependency. + * + * @param entityId the entityId value to set + * @return the USqlAssemblyDependencyInfo object itself. + */ + public USqlAssemblyDependencyInfo withEntityId(EntityId entityId) { + this.entityId = entityId; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyFileInfo.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyFileInfo.java new file mode 100644 index 000000000000..32cf9f975329 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlAssemblyFileInfo.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL assembly file information item. + */ +public class USqlAssemblyFileInfo { + /** + * the assembly file type. Possible values include: 'Assembly', 'Resource'. + */ + @JsonProperty(value = "type") + private FileType type; + + /** + * the the original path to the assembly file. + */ + @JsonProperty(value = "originalPath") + private String originalPath; + + /** + * the the content path to the assembly file. + */ + @JsonProperty(value = "contentPath") + private String contentPath; + + /** + * Get the assembly file type. Possible values include: 'Assembly', 'Resource'. + * + * @return the type value + */ + public FileType type() { + return this.type; + } + + /** + * Set the assembly file type. Possible values include: 'Assembly', 'Resource'. + * + * @param type the type value to set + * @return the USqlAssemblyFileInfo object itself. + */ + public USqlAssemblyFileInfo withType(FileType type) { + this.type = type; + return this; + } + + /** + * Get the the original path to the assembly file. + * + * @return the originalPath value + */ + public String originalPath() { + return this.originalPath; + } + + /** + * Set the the original path to the assembly file. + * + * @param originalPath the originalPath value to set + * @return the USqlAssemblyFileInfo object itself. + */ + public USqlAssemblyFileInfo withOriginalPath(String originalPath) { + this.originalPath = originalPath; + return this; + } + + /** + * Get the the content path to the assembly file. + * + * @return the contentPath value + */ + public String contentPath() { + return this.contentPath; + } + + /** + * Set the the content path to the assembly file. + * + * @param contentPath the contentPath value to set + * @return the USqlAssemblyFileInfo object itself. + */ + public USqlAssemblyFileInfo withContentPath(String contentPath) { + this.contentPath = contentPath; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlCredential.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlCredential.java new file mode 100644 index 000000000000..d71dea0b784e --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlCredential.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL credential item. + */ +public class USqlCredential extends CatalogItem { + /** + * the name of the database the credential is in. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the secret associated with the credential. + */ + @JsonProperty(value = "identity") + private String identity; + + /** + * the name of the credential. + */ + @JsonProperty(value = "credentialName") + private String name; + + /** + * the user name associated with the credential. + */ + @JsonProperty(value = "userName") + private String userName; + + /** + * Get the name of the database the credential is in. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database the credential is in. + * + * @param databaseName the databaseName value to set + * @return the USqlCredential object itself. + */ + public USqlCredential withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the secret associated with the credential. + * + * @return the identity value + */ + public String identity() { + return this.identity; + } + + /** + * Set the name of the secret associated with the credential. + * + * @param identity the identity value to set + * @return the USqlCredential object itself. + */ + public USqlCredential withIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the name of the credential. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the credential. + * + * @param name the name value to set + * @return the USqlCredential object itself. + */ + public USqlCredential withName(String name) { + this.name = name; + return this; + } + + /** + * Get the user name associated with the credential. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set the user name associated with the credential. + * + * @param userName the userName value to set + * @return the USqlCredential object itself. + */ + public USqlCredential withUserName(String userName) { + this.userName = userName; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDatabase.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDatabase.java new file mode 100644 index 000000000000..f6e243760977 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDatabase.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL database item. + */ +public class USqlDatabase extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String name; + + /** + * Get the name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the database. + * + * @param name the name value to set + * @return the USqlDatabase object itself. + */ + public USqlDatabase withName(String name) { + this.name = name; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDirectedColumn.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDirectedColumn.java new file mode 100644 index 000000000000..6b61c4750ae4 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDirectedColumn.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL directed column item. + */ +public class USqlDirectedColumn { + /** + * the name of the index in the table. + */ + @JsonProperty(value = "name") + private String name; + + /** + * the switch indicating if the index is descending or not. + */ + @JsonProperty(value = "descending") + private Boolean descending; + + /** + * Get the name of the index in the table. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the index in the table. + * + * @param name the name value to set + * @return the USqlDirectedColumn object itself. + */ + public USqlDirectedColumn withName(String name) { + this.name = name; + return this; + } + + /** + * Get the switch indicating if the index is descending or not. + * + * @return the descending value + */ + public Boolean descending() { + return this.descending; + } + + /** + * Set the switch indicating if the index is descending or not. + * + * @param descending the descending value to set + * @return the USqlDirectedColumn object itself. + */ + public USqlDirectedColumn withDescending(Boolean descending) { + this.descending = descending; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDistributionInfo.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDistributionInfo.java new file mode 100644 index 000000000000..118100bd7d07 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlDistributionInfo.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL distribution information object. + */ +public class USqlDistributionInfo { + /** + * the type of this distribution. + */ + @JsonProperty(value = "type") + private Integer type; + + /** + * the list of directed columns in the distribution. + */ + @JsonProperty(value = "keys") + private List keys; + + /** + * the count of indices using this distribution. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * the dynamic count of indices using this distribution. + */ + @JsonProperty(value = "dynamicCount") + private Integer dynamicCount; + + /** + * Get the type of this distribution. + * + * @return the type value + */ + public Integer type() { + return this.type; + } + + /** + * Set the type of this distribution. + * + * @param type the type value to set + * @return the USqlDistributionInfo object itself. + */ + public USqlDistributionInfo withType(Integer type) { + this.type = type; + return this; + } + + /** + * Get the list of directed columns in the distribution. + * + * @return the keys value + */ + public List keys() { + return this.keys; + } + + /** + * Set the list of directed columns in the distribution. + * + * @param keys the keys value to set + * @return the USqlDistributionInfo object itself. + */ + public USqlDistributionInfo withKeys(List keys) { + this.keys = keys; + return this; + } + + /** + * Get the count of indices using this distribution. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the count of indices using this distribution. + * + * @param count the count value to set + * @return the USqlDistributionInfo object itself. + */ + public USqlDistributionInfo withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the dynamic count of indices using this distribution. + * + * @return the dynamicCount value + */ + public Integer dynamicCount() { + return this.dynamicCount; + } + + /** + * Set the dynamic count of indices using this distribution. + * + * @param dynamicCount the dynamicCount value to set + * @return the USqlDistributionInfo object itself. + */ + public USqlDistributionInfo withDynamicCount(Integer dynamicCount) { + this.dynamicCount = dynamicCount; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlExternalDataSource.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlExternalDataSource.java new file mode 100644 index 000000000000..9f53025fcd2e --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlExternalDataSource.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL external datasource item. + */ +public class USqlExternalDataSource extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the external data source. + */ + @JsonProperty(value = "externalDataSourceName") + private String name; + + /** + * the name of the provider for the external data source. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * the name of the provider string for the external data source. + */ + @JsonProperty(value = "providerString") + private String providerString; + + /** + * the list of types to push down from the external data source. + */ + @JsonProperty(value = "pushdownTypes") + private List pushdownTypes; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlExternalDataSource object itself. + */ + public USqlExternalDataSource withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the external data source. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the external data source. + * + * @param name the name value to set + * @return the USqlExternalDataSource object itself. + */ + public USqlExternalDataSource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the name of the provider for the external data source. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the name of the provider for the external data source. + * + * @param provider the provider value to set + * @return the USqlExternalDataSource object itself. + */ + public USqlExternalDataSource withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the name of the provider string for the external data source. + * + * @return the providerString value + */ + public String providerString() { + return this.providerString; + } + + /** + * Set the name of the provider string for the external data source. + * + * @param providerString the providerString value to set + * @return the USqlExternalDataSource object itself. + */ + public USqlExternalDataSource withProviderString(String providerString) { + this.providerString = providerString; + return this; + } + + /** + * Get the list of types to push down from the external data source. + * + * @return the pushdownTypes value + */ + public List pushdownTypes() { + return this.pushdownTypes; + } + + /** + * Set the list of types to push down from the external data source. + * + * @param pushdownTypes the pushdownTypes value to set + * @return the USqlExternalDataSource object itself. + */ + public USqlExternalDataSource withPushdownTypes(List pushdownTypes) { + this.pushdownTypes = pushdownTypes; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlIndex.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlIndex.java new file mode 100644 index 000000000000..d45095048c97 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlIndex.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table index item. + */ +public class USqlIndex { + /** + * the name of the index in the table. + */ + @JsonProperty(value = "name") + private String name; + + /** + * the list of directed columns in the index. + */ + @JsonProperty(value = "indexKeys") + private List indexKeys; + + /** + * the list of columns in the index. + */ + @JsonProperty(value = "columns") + private List columns; + + /** + * the distributions info of the index. + */ + @JsonProperty(value = "distributionInfo") + private USqlDistributionInfo distributionInfo; + + /** + * partition function ID for the index. + */ + @JsonProperty(value = "partitionFunction") + private UUID partitionFunction; + + /** + * the list of partion keys in the index. + */ + @JsonProperty(value = "partitionKeyList") + private List partitionKeyList; + + /** + * the list of full paths to the streams that contain this index in the + * DataLake account. + */ + @JsonProperty(value = "streamNames") + private List streamNames; + + /** + * the switch indicating if this index is a columnstore index. + */ + @JsonProperty(value = "isColumnstore") + private Boolean isColumnstore; + + /** + * the ID of this index within the table. + */ + @JsonProperty(value = "indexId") + private Integer indexId; + + /** + * the switch indicating if this index is a unique index. + */ + @JsonProperty(value = "isUnique") + private Boolean isUnique; + + /** + * Get the name of the index in the table. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the index in the table. + * + * @param name the name value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withName(String name) { + this.name = name; + return this; + } + + /** + * Get the list of directed columns in the index. + * + * @return the indexKeys value + */ + public List indexKeys() { + return this.indexKeys; + } + + /** + * Set the list of directed columns in the index. + * + * @param indexKeys the indexKeys value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withIndexKeys(List indexKeys) { + this.indexKeys = indexKeys; + return this; + } + + /** + * Get the list of columns in the index. + * + * @return the columns value + */ + public List columns() { + return this.columns; + } + + /** + * Set the list of columns in the index. + * + * @param columns the columns value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withColumns(List columns) { + this.columns = columns; + return this; + } + + /** + * Get the distributions info of the index. + * + * @return the distributionInfo value + */ + public USqlDistributionInfo distributionInfo() { + return this.distributionInfo; + } + + /** + * Set the distributions info of the index. + * + * @param distributionInfo the distributionInfo value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withDistributionInfo(USqlDistributionInfo distributionInfo) { + this.distributionInfo = distributionInfo; + return this; + } + + /** + * Get partition function ID for the index. + * + * @return the partitionFunction value + */ + public UUID partitionFunction() { + return this.partitionFunction; + } + + /** + * Set partition function ID for the index. + * + * @param partitionFunction the partitionFunction value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withPartitionFunction(UUID partitionFunction) { + this.partitionFunction = partitionFunction; + return this; + } + + /** + * Get the list of partion keys in the index. + * + * @return the partitionKeyList value + */ + public List partitionKeyList() { + return this.partitionKeyList; + } + + /** + * Set the list of partion keys in the index. + * + * @param partitionKeyList the partitionKeyList value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withPartitionKeyList(List partitionKeyList) { + this.partitionKeyList = partitionKeyList; + return this; + } + + /** + * Get the list of full paths to the streams that contain this index in the DataLake account. + * + * @return the streamNames value + */ + public List streamNames() { + return this.streamNames; + } + + /** + * Set the list of full paths to the streams that contain this index in the DataLake account. + * + * @param streamNames the streamNames value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withStreamNames(List streamNames) { + this.streamNames = streamNames; + return this; + } + + /** + * Get the switch indicating if this index is a columnstore index. + * + * @return the isColumnstore value + */ + public Boolean isColumnstore() { + return this.isColumnstore; + } + + /** + * Set the switch indicating if this index is a columnstore index. + * + * @param isColumnstore the isColumnstore value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withIsColumnstore(Boolean isColumnstore) { + this.isColumnstore = isColumnstore; + return this; + } + + /** + * Get the ID of this index within the table. + * + * @return the indexId value + */ + public Integer indexId() { + return this.indexId; + } + + /** + * Set the ID of this index within the table. + * + * @param indexId the indexId value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withIndexId(Integer indexId) { + this.indexId = indexId; + return this; + } + + /** + * Get the switch indicating if this index is a unique index. + * + * @return the isUnique value + */ + public Boolean isUnique() { + return this.isUnique; + } + + /** + * Set the switch indicating if this index is a unique index. + * + * @param isUnique the isUnique value to set + * @return the USqlIndex object itself. + */ + public USqlIndex withIsUnique(Boolean isUnique) { + this.isUnique = isUnique; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlJobProperties.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlJobProperties.java new file mode 100644 index 000000000000..18abcd77d557 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlJobProperties.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The USqlJobProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("USql") +public class USqlJobProperties extends JobProperties { + /** + * Gets or sets the list of resources that are required by the job. + */ + @JsonProperty(value = "resources") + private List resources; + + /** + * Gets or sets the job specific statistics. + */ + @JsonProperty(value = "statistics") + private JobStatistics statistics; + + /** + * Gets or sets the job specific debug data locations. + */ + @JsonProperty(value = "debugData") + private JobDataPath debugData; + + /** + * Gets the U-SQL algebra file path after the job has completed. + */ + @JsonProperty(value = "algebraFilePath", access = JsonProperty.Access.WRITE_ONLY) + private String algebraFilePath; + + /** + * Gets the total time this job spent compiling. This value should not be + * set by the user and will be ignored if it is. + */ + @JsonProperty(value = "totalCompilationTime", access = JsonProperty.Access.WRITE_ONLY) + private String totalCompilationTime; + + /** + * Gets the total time this job spent paused. This value should not be set + * by the user and will be ignored if it is. + */ + @JsonProperty(value = "totalPauseTime", access = JsonProperty.Access.WRITE_ONLY) + private String totalPauseTime; + + /** + * Gets the total time this job spent queued. This value should not be set + * by the user and will be ignored if it is. + */ + @JsonProperty(value = "totalQueuedTime", access = JsonProperty.Access.WRITE_ONLY) + private String totalQueuedTime; + + /** + * Gets the total time this job spent executing. This value should not be + * set by the user and will be ignored if it is. + */ + @JsonProperty(value = "totalRunningTime", access = JsonProperty.Access.WRITE_ONLY) + private String totalRunningTime; + + /** + * Gets the ID used to identify the job manager coordinating job execution. + * This value should not be set by the user and will be ignored if it is. + */ + @JsonProperty(value = "rootProcessNodeId", access = JsonProperty.Access.WRITE_ONLY) + private String rootProcessNodeId; + + /** + * Gets the ID used to identify the yarn application executing the job. + * This value should not be set by the user and will be ignored if it is. + */ + @JsonProperty(value = "yarnApplicationId", access = JsonProperty.Access.WRITE_ONLY) + private String yarnApplicationId; + + /** + * Gets the timestamp (in ticks) for the yarn application executing the + * job. This value should not be set by the user and will be ignored if it + * is. + */ + @JsonProperty(value = "yarnApplicationTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private Long yarnApplicationTimeStamp; + + /** + * Gets or sets the compile mode for the job. Possible values include: + * 'Semantic', 'Full', 'SingleBox'. + */ + @JsonProperty(value = "compileMode") + private CompileMode compileMode; + + /** + * Get gets or sets the list of resources that are required by the job. + * + * @return the resources value + */ + public List resources() { + return this.resources; + } + + /** + * Set gets or sets the list of resources that are required by the job. + * + * @param resources the resources value to set + * @return the USqlJobProperties object itself. + */ + public USqlJobProperties withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Get gets or sets the job specific statistics. + * + * @return the statistics value + */ + public JobStatistics statistics() { + return this.statistics; + } + + /** + * Set gets or sets the job specific statistics. + * + * @param statistics the statistics value to set + * @return the USqlJobProperties object itself. + */ + public USqlJobProperties withStatistics(JobStatistics statistics) { + this.statistics = statistics; + return this; + } + + /** + * Get gets or sets the job specific debug data locations. + * + * @return the debugData value + */ + public JobDataPath debugData() { + return this.debugData; + } + + /** + * Set gets or sets the job specific debug data locations. + * + * @param debugData the debugData value to set + * @return the USqlJobProperties object itself. + */ + public USqlJobProperties withDebugData(JobDataPath debugData) { + this.debugData = debugData; + return this; + } + + /** + * Get gets the U-SQL algebra file path after the job has completed. + * + * @return the algebraFilePath value + */ + public String algebraFilePath() { + return this.algebraFilePath; + } + + /** + * Get gets the total time this job spent compiling. This value should not be set by the user and will be ignored if it is. + * + * @return the totalCompilationTime value + */ + public String totalCompilationTime() { + return this.totalCompilationTime; + } + + /** + * Get gets the total time this job spent paused. This value should not be set by the user and will be ignored if it is. + * + * @return the totalPauseTime value + */ + public String totalPauseTime() { + return this.totalPauseTime; + } + + /** + * Get gets the total time this job spent queued. This value should not be set by the user and will be ignored if it is. + * + * @return the totalQueuedTime value + */ + public String totalQueuedTime() { + return this.totalQueuedTime; + } + + /** + * Get gets the total time this job spent executing. This value should not be set by the user and will be ignored if it is. + * + * @return the totalRunningTime value + */ + public String totalRunningTime() { + return this.totalRunningTime; + } + + /** + * Get gets the ID used to identify the job manager coordinating job execution. This value should not be set by the user and will be ignored if it is. + * + * @return the rootProcessNodeId value + */ + public String rootProcessNodeId() { + return this.rootProcessNodeId; + } + + /** + * Get gets the ID used to identify the yarn application executing the job. This value should not be set by the user and will be ignored if it is. + * + * @return the yarnApplicationId value + */ + public String yarnApplicationId() { + return this.yarnApplicationId; + } + + /** + * Get gets the timestamp (in ticks) for the yarn application executing the job. This value should not be set by the user and will be ignored if it is. + * + * @return the yarnApplicationTimeStamp value + */ + public Long yarnApplicationTimeStamp() { + return this.yarnApplicationTimeStamp; + } + + /** + * Get gets or sets the compile mode for the job. Possible values include: 'Semantic', 'Full', 'SingleBox'. + * + * @return the compileMode value + */ + public CompileMode compileMode() { + return this.compileMode; + } + + /** + * Set gets or sets the compile mode for the job. Possible values include: 'Semantic', 'Full', 'SingleBox'. + * + * @param compileMode the compileMode value to set + * @return the USqlJobProperties object itself. + */ + public USqlJobProperties withCompileMode(CompileMode compileMode) { + this.compileMode = compileMode; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlPackage.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlPackage.java new file mode 100644 index 000000000000..98ab7040acab --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlPackage.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL package item. + */ +public class USqlPackage extends CatalogItem { + /** + * the name of the database containing the package. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this package and database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of the package. + */ + @JsonProperty(value = "packageName") + private String name; + + /** + * the definition of the package. + */ + @JsonProperty(value = "definition") + private String definition; + + /** + * Get the name of the database containing the package. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database containing the package. + * + * @param databaseName the databaseName value to set + * @return the USqlPackage object itself. + */ + public USqlPackage withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this package and database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this package and database. + * + * @param schemaName the schemaName value to set + * @return the USqlPackage object itself. + */ + public USqlPackage withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of the package. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the package. + * + * @param name the name value to set + * @return the USqlPackage object itself. + */ + public USqlPackage withName(String name) { + this.name = name; + return this; + } + + /** + * Get the definition of the package. + * + * @return the definition value + */ + public String definition() { + return this.definition; + } + + /** + * Set the definition of the package. + * + * @param definition the definition value to set + * @return the USqlPackage object itself. + */ + public USqlPackage withDefinition(String definition) { + this.definition = definition; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlProcedure.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlProcedure.java new file mode 100644 index 000000000000..19c05eba2dac --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlProcedure.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL procedure item. + */ +public class USqlProcedure extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this procedure and database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of the procedure. + */ + @JsonProperty(value = "procName") + private String name; + + /** + * the defined query of the procedure. + */ + @JsonProperty(value = "definition") + private String definition; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlProcedure object itself. + */ + public USqlProcedure withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this procedure and database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this procedure and database. + * + * @param schemaName the schemaName value to set + * @return the USqlProcedure object itself. + */ + public USqlProcedure withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of the procedure. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the procedure. + * + * @param name the name value to set + * @return the USqlProcedure object itself. + */ + public USqlProcedure withName(String name) { + this.name = name; + return this; + } + + /** + * Get the defined query of the procedure. + * + * @return the definition value + */ + public String definition() { + return this.definition; + } + + /** + * Set the defined query of the procedure. + * + * @param definition the definition value to set + * @return the USqlProcedure object itself. + */ + public USqlProcedure withDefinition(String definition) { + this.definition = definition; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSchema.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSchema.java new file mode 100644 index 000000000000..947d20fa8b33 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSchema.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL schema item. + */ +public class USqlSchema extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema. + */ + @JsonProperty(value = "schemaName") + private String name; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlSchema object itself. + */ + public USqlSchema withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the schema. + * + * @param name the name value to set + * @return the USqlSchema object itself. + */ + public USqlSchema withName(String name) { + this.name = name; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSecret.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSecret.java new file mode 100644 index 000000000000..d550c37a662e --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlSecret.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL secret item. + */ +public class USqlSecret extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the secret. + */ + @JsonProperty(value = "secretName") + private String name; + + /** + * the creation time of the credential object. This is the only information + * returned about a secret from a GET. + */ + @JsonProperty(value = "creationTime") + private DateTime creationTime; + + /** + * the URI identifier for the secret in the format + * <hostname>:<port>. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * the password for the secret to pass in. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlSecret object itself. + */ + public USqlSecret withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the secret. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the secret. + * + * @param name the name value to set + * @return the USqlSecret object itself. + */ + public USqlSecret withName(String name) { + this.name = name; + return this; + } + + /** + * Get the creation time of the credential object. This is the only information returned about a secret from a GET. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Set the creation time of the credential object. This is the only information returned about a secret from a GET. + * + * @param creationTime the creationTime value to set + * @return the USqlSecret object itself. + */ + public USqlSecret withCreationTime(DateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Get the URI identifier for the secret in the format <hostname>:<port>. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set the URI identifier for the secret in the format <hostname>:<port>. + * + * @param uri the uri value to set + * @return the USqlSecret object itself. + */ + public USqlSecret withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the password for the secret to pass in. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password for the secret to pass in. + * + * @param password the password value to set + * @return the USqlSecret object itself. + */ + public USqlSecret withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTable.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTable.java new file mode 100644 index 000000000000..0474a4dadd68 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTable.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table item. + */ +public class USqlTable extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this table and database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of the table. + */ + @JsonProperty(value = "tableName") + private String name; + + /** + * the list of columns in this table. + */ + @JsonProperty(value = "columnList") + private List columnList; + + /** + * the list of indices in this table. + */ + @JsonProperty(value = "indexList") + private List indexList; + + /** + * the list of partition keys in the table. + */ + @JsonProperty(value = "partitionKeyList") + private List partitionKeyList; + + /** + * the external table associated with the table. + */ + @JsonProperty(value = "externalTable") + private ExternalTable externalTable; + + /** + * the distributions info of the table. + */ + @JsonProperty(value = "distributionInfo") + private USqlDistributionInfo distributionInfo; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlTable object itself. + */ + public USqlTable withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this table and database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this table and database. + * + * @param schemaName the schemaName value to set + * @return the USqlTable object itself. + */ + public USqlTable withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of the table. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the table. + * + * @param name the name value to set + * @return the USqlTable object itself. + */ + public USqlTable withName(String name) { + this.name = name; + return this; + } + + /** + * Get the list of columns in this table. + * + * @return the columnList value + */ + public List columnList() { + return this.columnList; + } + + /** + * Set the list of columns in this table. + * + * @param columnList the columnList value to set + * @return the USqlTable object itself. + */ + public USqlTable withColumnList(List columnList) { + this.columnList = columnList; + return this; + } + + /** + * Get the list of indices in this table. + * + * @return the indexList value + */ + public List indexList() { + return this.indexList; + } + + /** + * Set the list of indices in this table. + * + * @param indexList the indexList value to set + * @return the USqlTable object itself. + */ + public USqlTable withIndexList(List indexList) { + this.indexList = indexList; + return this; + } + + /** + * Get the list of partition keys in the table. + * + * @return the partitionKeyList value + */ + public List partitionKeyList() { + return this.partitionKeyList; + } + + /** + * Set the list of partition keys in the table. + * + * @param partitionKeyList the partitionKeyList value to set + * @return the USqlTable object itself. + */ + public USqlTable withPartitionKeyList(List partitionKeyList) { + this.partitionKeyList = partitionKeyList; + return this; + } + + /** + * Get the external table associated with the table. + * + * @return the externalTable value + */ + public ExternalTable externalTable() { + return this.externalTable; + } + + /** + * Set the external table associated with the table. + * + * @param externalTable the externalTable value to set + * @return the USqlTable object itself. + */ + public USqlTable withExternalTable(ExternalTable externalTable) { + this.externalTable = externalTable; + return this; + } + + /** + * Get the distributions info of the table. + * + * @return the distributionInfo value + */ + public USqlDistributionInfo distributionInfo() { + return this.distributionInfo; + } + + /** + * Set the distributions info of the table. + * + * @param distributionInfo the distributionInfo value to set + * @return the USqlTable object itself. + */ + public USqlTable withDistributionInfo(USqlDistributionInfo distributionInfo) { + this.distributionInfo = distributionInfo; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableColumn.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableColumn.java new file mode 100644 index 000000000000..e388b6b4ca4f --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableColumn.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table column item. + */ +public class USqlTableColumn { + /** + * the name of the column in the table. + */ + @JsonProperty(value = "name") + private String name; + + /** + * the object type of the specified column (such as System.String). + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the name of the column in the table. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the column in the table. + * + * @param name the name value to set + * @return the USqlTableColumn object itself. + */ + public USqlTableColumn withName(String name) { + this.name = name; + return this; + } + + /** + * Get the object type of the specified column (such as System.String). + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the object type of the specified column (such as System.String). + * + * @param type the type value to set + * @return the USqlTableColumn object itself. + */ + public USqlTableColumn withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableFragment.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableFragment.java new file mode 100644 index 000000000000..a74dd25b708d --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableFragment.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.UUID; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table fragment item. + */ +public class USqlTableFragment { + /** + * the parent object Id of the table fragment. The parent could be a table + * or table partition. + */ + @JsonProperty(value = "parentId") + private UUID parentId; + + /** + * the version of the catalog item. + */ + @JsonProperty(value = "fragmentId") + private UUID fragmentId; + + /** + * the ordinal of the index which contains the table fragment. + */ + @JsonProperty(value = "indexId") + private Integer indexId; + + /** + * the data size of the table fragment in bytes. + */ + @JsonProperty(value = "size") + private Long size; + + /** + * the number of rows in the table fragment. + */ + @JsonProperty(value = "rowCount") + private Long rowCount; + + /** + * the creation time of the table fragment. + */ + @JsonProperty(value = "createDate") + private DateTime createDate; + + /** + * Get the parent object Id of the table fragment. The parent could be a table or table partition. + * + * @return the parentId value + */ + public UUID parentId() { + return this.parentId; + } + + /** + * Set the parent object Id of the table fragment. The parent could be a table or table partition. + * + * @param parentId the parentId value to set + * @return the USqlTableFragment object itself. + */ + public USqlTableFragment withParentId(UUID parentId) { + this.parentId = parentId; + return this; + } + + /** + * Get the version of the catalog item. + * + * @return the fragmentId value + */ + public UUID fragmentId() { + return this.fragmentId; + } + + /** + * Set the version of the catalog item. + * + * @param fragmentId the fragmentId value to set + * @return the USqlTableFragment object itself. + */ + public USqlTableFragment withFragmentId(UUID fragmentId) { + this.fragmentId = fragmentId; + return this; + } + + /** + * Get the ordinal of the index which contains the table fragment. + * + * @return the indexId value + */ + public Integer indexId() { + return this.indexId; + } + + /** + * Set the ordinal of the index which contains the table fragment. + * + * @param indexId the indexId value to set + * @return the USqlTableFragment object itself. + */ + public USqlTableFragment withIndexId(Integer indexId) { + this.indexId = indexId; + return this; + } + + /** + * Get the data size of the table fragment in bytes. + * + * @return the size value + */ + public Long size() { + return this.size; + } + + /** + * Set the data size of the table fragment in bytes. + * + * @param size the size value to set + * @return the USqlTableFragment object itself. + */ + public USqlTableFragment withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the number of rows in the table fragment. + * + * @return the rowCount value + */ + public Long rowCount() { + return this.rowCount; + } + + /** + * Set the number of rows in the table fragment. + * + * @param rowCount the rowCount value to set + * @return the USqlTableFragment object itself. + */ + public USqlTableFragment withRowCount(Long rowCount) { + this.rowCount = rowCount; + return this; + } + + /** + * Get the creation time of the table fragment. + * + * @return the createDate value + */ + public DateTime createDate() { + return this.createDate; + } + + /** + * Set the creation time of the table fragment. + * + * @param createDate the createDate value to set + * @return the USqlTableFragment object itself. + */ + public USqlTableFragment withCreateDate(DateTime createDate) { + this.createDate = createDate; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePartition.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePartition.java new file mode 100644 index 000000000000..15e1ad632ee0 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePartition.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table partition item. + */ +public class USqlTablePartition extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this table partition and + * database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of the table partition. + */ + @JsonProperty(value = "partitionName") + private String name; + + /** + * the Ddl object of the partition's parent. + */ + @JsonProperty(value = "parentName") + private DdlName parentName; + + /** + * the index ID for this partition. + */ + @JsonProperty(value = "indexId") + private Integer indexId; + + /** + * the list of labels associated with this partition. + */ + @JsonProperty(value = "label") + private List label; + + /** + * the creation time of the partition. + */ + @JsonProperty(value = "createDate") + private DateTime createDate; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlTablePartition object itself. + */ + public USqlTablePartition withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this table partition and database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this table partition and database. + * + * @param schemaName the schemaName value to set + * @return the USqlTablePartition object itself. + */ + public USqlTablePartition withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of the table partition. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the table partition. + * + * @param name the name value to set + * @return the USqlTablePartition object itself. + */ + public USqlTablePartition withName(String name) { + this.name = name; + return this; + } + + /** + * Get the Ddl object of the partition's parent. + * + * @return the parentName value + */ + public DdlName parentName() { + return this.parentName; + } + + /** + * Set the Ddl object of the partition's parent. + * + * @param parentName the parentName value to set + * @return the USqlTablePartition object itself. + */ + public USqlTablePartition withParentName(DdlName parentName) { + this.parentName = parentName; + return this; + } + + /** + * Get the index ID for this partition. + * + * @return the indexId value + */ + public Integer indexId() { + return this.indexId; + } + + /** + * Set the index ID for this partition. + * + * @param indexId the indexId value to set + * @return the USqlTablePartition object itself. + */ + public USqlTablePartition withIndexId(Integer indexId) { + this.indexId = indexId; + return this; + } + + /** + * Get the list of labels associated with this partition. + * + * @return the label value + */ + public List label() { + return this.label; + } + + /** + * Set the list of labels associated with this partition. + * + * @param label the label value to set + * @return the USqlTablePartition object itself. + */ + public USqlTablePartition withLabel(List label) { + this.label = label; + return this; + } + + /** + * Get the creation time of the partition. + * + * @return the createDate value + */ + public DateTime createDate() { + return this.createDate; + } + + /** + * Set the creation time of the partition. + * + * @param createDate the createDate value to set + * @return the USqlTablePartition object itself. + */ + public USqlTablePartition withCreateDate(DateTime createDate) { + this.createDate = createDate; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePreview.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePreview.java new file mode 100644 index 000000000000..040d8e4bea44 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTablePreview.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog table or partition preview rows item. + */ +public class USqlTablePreview { + /** + * the total number of rows in the table or partition. + */ + @JsonProperty(value = "totalRowCount") + private Long totalRowCount; + + /** + * the total number of columns in the table or partition. + */ + @JsonProperty(value = "totalColumnCount") + private Long totalColumnCount; + + /** + * the rows of the table or partition preview, where each row is an array + * of string representations the row's values. Note: Byte arrays will + * appear as base-64 encoded values, SqlMap and SqlArray objects will + * appear as escaped JSON objects, and DateTime objects will appear as ISO + * formatted UTC date-times. + */ + @JsonProperty(value = "rows") + private List> rows; + + /** + * true if the amount of data in the response is less than expected due to + * the preview operation's size limitations. This can occur if the + * requested rows or row counts are too large. + */ + @JsonProperty(value = "truncated") + private Boolean truncated; + + /** + * the schema of the table or partition. + */ + @JsonProperty(value = "schema") + private List schema; + + /** + * Get the total number of rows in the table or partition. + * + * @return the totalRowCount value + */ + public Long totalRowCount() { + return this.totalRowCount; + } + + /** + * Set the total number of rows in the table or partition. + * + * @param totalRowCount the totalRowCount value to set + * @return the USqlTablePreview object itself. + */ + public USqlTablePreview withTotalRowCount(Long totalRowCount) { + this.totalRowCount = totalRowCount; + return this; + } + + /** + * Get the total number of columns in the table or partition. + * + * @return the totalColumnCount value + */ + public Long totalColumnCount() { + return this.totalColumnCount; + } + + /** + * Set the total number of columns in the table or partition. + * + * @param totalColumnCount the totalColumnCount value to set + * @return the USqlTablePreview object itself. + */ + public USqlTablePreview withTotalColumnCount(Long totalColumnCount) { + this.totalColumnCount = totalColumnCount; + return this; + } + + /** + * Get the rows of the table or partition preview, where each row is an array of string representations the row's values. Note: Byte arrays will appear as base-64 encoded values, SqlMap and SqlArray objects will appear as escaped JSON objects, and DateTime objects will appear as ISO formatted UTC date-times. + * + * @return the rows value + */ + public List> rows() { + return this.rows; + } + + /** + * Set the rows of the table or partition preview, where each row is an array of string representations the row's values. Note: Byte arrays will appear as base-64 encoded values, SqlMap and SqlArray objects will appear as escaped JSON objects, and DateTime objects will appear as ISO formatted UTC date-times. + * + * @param rows the rows value to set + * @return the USqlTablePreview object itself. + */ + public USqlTablePreview withRows(List> rows) { + this.rows = rows; + return this; + } + + /** + * Get true if the amount of data in the response is less than expected due to the preview operation's size limitations. This can occur if the requested rows or row counts are too large. + * + * @return the truncated value + */ + public Boolean truncated() { + return this.truncated; + } + + /** + * Set true if the amount of data in the response is less than expected due to the preview operation's size limitations. This can occur if the requested rows or row counts are too large. + * + * @param truncated the truncated value to set + * @return the USqlTablePreview object itself. + */ + public USqlTablePreview withTruncated(Boolean truncated) { + this.truncated = truncated; + return this; + } + + /** + * Get the schema of the table or partition. + * + * @return the schema value + */ + public List schema() { + return this.schema; + } + + /** + * Set the schema of the table or partition. + * + * @param schema the schema value to set + * @return the USqlTablePreview object itself. + */ + public USqlTablePreview withSchema(List schema) { + this.schema = schema; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableStatistics.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableStatistics.java new file mode 100644 index 000000000000..b811f70861ed --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableStatistics.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table statistics item. + */ +public class USqlTableStatistics extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this table and database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of the table. + */ + @JsonProperty(value = "tableName") + private String tableName; + + /** + * the name of the table statistics. + */ + @JsonProperty(value = "statisticsName") + private String name; + + /** + * the name of the user statistics. + */ + @JsonProperty(value = "userStatName") + private String userStatName; + + /** + * the path to the statistics data. + */ + @JsonProperty(value = "statDataPath") + private String statDataPath; + + /** + * the creation time of the statistics. + */ + @JsonProperty(value = "createTime") + private DateTime createTime; + + /** + * the last time the statistics were updated. + */ + @JsonProperty(value = "updateTime") + private DateTime updateTime; + + /** + * the switch indicating if these statistics are user created. + */ + @JsonProperty(value = "isUserCreated") + private Boolean isUserCreated; + + /** + * the switch indicating if these statistics are automatically created. + */ + @JsonProperty(value = "isAutoCreated") + private Boolean isAutoCreated; + + /** + * the switch indicating if these statistics have a filter. + */ + @JsonProperty(value = "hasFilter") + private Boolean hasFilter; + + /** + * the filter definition for the statistics. + */ + @JsonProperty(value = "filterDefinition") + private String filterDefinition; + + /** + * the list of column names associated with these statistics. + */ + @JsonProperty(value = "colNames") + private List colNames; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this table and database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this table and database. + * + * @param schemaName the schemaName value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of the table. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the name of the table. + * + * @param tableName the tableName value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the name of the table statistics. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the table statistics. + * + * @param name the name value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withName(String name) { + this.name = name; + return this; + } + + /** + * Get the name of the user statistics. + * + * @return the userStatName value + */ + public String userStatName() { + return this.userStatName; + } + + /** + * Set the name of the user statistics. + * + * @param userStatName the userStatName value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withUserStatName(String userStatName) { + this.userStatName = userStatName; + return this; + } + + /** + * Get the path to the statistics data. + * + * @return the statDataPath value + */ + public String statDataPath() { + return this.statDataPath; + } + + /** + * Set the path to the statistics data. + * + * @param statDataPath the statDataPath value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withStatDataPath(String statDataPath) { + this.statDataPath = statDataPath; + return this; + } + + /** + * Get the creation time of the statistics. + * + * @return the createTime value + */ + public DateTime createTime() { + return this.createTime; + } + + /** + * Set the creation time of the statistics. + * + * @param createTime the createTime value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withCreateTime(DateTime createTime) { + this.createTime = createTime; + return this; + } + + /** + * Get the last time the statistics were updated. + * + * @return the updateTime value + */ + public DateTime updateTime() { + return this.updateTime; + } + + /** + * Set the last time the statistics were updated. + * + * @param updateTime the updateTime value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withUpdateTime(DateTime updateTime) { + this.updateTime = updateTime; + return this; + } + + /** + * Get the switch indicating if these statistics are user created. + * + * @return the isUserCreated value + */ + public Boolean isUserCreated() { + return this.isUserCreated; + } + + /** + * Set the switch indicating if these statistics are user created. + * + * @param isUserCreated the isUserCreated value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withIsUserCreated(Boolean isUserCreated) { + this.isUserCreated = isUserCreated; + return this; + } + + /** + * Get the switch indicating if these statistics are automatically created. + * + * @return the isAutoCreated value + */ + public Boolean isAutoCreated() { + return this.isAutoCreated; + } + + /** + * Set the switch indicating if these statistics are automatically created. + * + * @param isAutoCreated the isAutoCreated value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withIsAutoCreated(Boolean isAutoCreated) { + this.isAutoCreated = isAutoCreated; + return this; + } + + /** + * Get the switch indicating if these statistics have a filter. + * + * @return the hasFilter value + */ + public Boolean hasFilter() { + return this.hasFilter; + } + + /** + * Set the switch indicating if these statistics have a filter. + * + * @param hasFilter the hasFilter value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withHasFilter(Boolean hasFilter) { + this.hasFilter = hasFilter; + return this; + } + + /** + * Get the filter definition for the statistics. + * + * @return the filterDefinition value + */ + public String filterDefinition() { + return this.filterDefinition; + } + + /** + * Set the filter definition for the statistics. + * + * @param filterDefinition the filterDefinition value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withFilterDefinition(String filterDefinition) { + this.filterDefinition = filterDefinition; + return this; + } + + /** + * Get the list of column names associated with these statistics. + * + * @return the colNames value + */ + public List colNames() { + return this.colNames; + } + + /** + * Set the list of column names associated with these statistics. + * + * @param colNames the colNames value to set + * @return the USqlTableStatistics object itself. + */ + public USqlTableStatistics withColNames(List colNames) { + this.colNames = colNames; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableType.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableType.java new file mode 100644 index 000000000000..91615656f0e0 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableType.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table type item. + */ +public class USqlTableType extends USqlType { + /** + * the type field information associated with this table type. + */ + @JsonProperty(value = "columns", access = JsonProperty.Access.WRITE_ONLY) + private List columns; + + /** + * Get the type field information associated with this table type. + * + * @return the columns value + */ + public List columns() { + return this.columns; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableValuedFunction.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableValuedFunction.java new file mode 100644 index 000000000000..b210fa56df25 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlTableValuedFunction.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL table valued function item. + */ +public class USqlTableValuedFunction extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of the table valued function. + */ + @JsonProperty(value = "tvfName") + private String name; + + /** + * the definition of the table valued function. + */ + @JsonProperty(value = "definition") + private String definition; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlTableValuedFunction object itself. + */ + public USqlTableValuedFunction withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this database. + * + * @param schemaName the schemaName value to set + * @return the USqlTableValuedFunction object itself. + */ + public USqlTableValuedFunction withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of the table valued function. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the table valued function. + * + * @param name the name value to set + * @return the USqlTableValuedFunction object itself. + */ + public USqlTableValuedFunction withName(String name) { + this.name = name; + return this; + } + + /** + * Get the definition of the table valued function. + * + * @return the definition value + */ + public String definition() { + return this.definition; + } + + /** + * Set the definition of the table valued function. + * + * @param definition the definition value to set + * @return the USqlTableValuedFunction object itself. + */ + public USqlTableValuedFunction withDefinition(String definition) { + this.definition = definition; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlType.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlType.java new file mode 100644 index 000000000000..97cee6e67521 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlType.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL type item. + */ +public class USqlType extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this table and database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of type for this type. + */ + @JsonProperty(value = "typeName") + private String name; + + /** + * the type family for this type. + */ + @JsonProperty(value = "typeFamily") + private String typeFamily; + + /** + * the C# name for this type. + */ + @JsonProperty(value = "cSharpName") + private String cSharpName; + + /** + * the fully qualified C# name for this type. + */ + @JsonProperty(value = "fullCSharpName") + private String fullCSharpName; + + /** + * the system type ID for this type. + */ + @JsonProperty(value = "systemTypeId") + private Integer systemTypeId; + + /** + * the user type ID for this type. + */ + @JsonProperty(value = "userTypeId") + private Integer userTypeId; + + /** + * the schema ID for this type. + */ + @JsonProperty(value = "schemaId") + private Integer schemaId; + + /** + * the principal ID for this type. + */ + @JsonProperty(value = "principalId") + private Integer principalId; + + /** + * the the switch indicating if this type is nullable. + */ + @JsonProperty(value = "isNullable") + private Boolean isNullable; + + /** + * the the switch indicating if this type is user defined. + */ + @JsonProperty(value = "isUserDefined") + private Boolean isUserDefined; + + /** + * the the switch indicating if this type is an assembly type. + */ + @JsonProperty(value = "isAssemblyType") + private Boolean isAssemblyType; + + /** + * the the switch indicating if this type is a table type. + */ + @JsonProperty(value = "isTableType") + private Boolean isTableType; + + /** + * the the switch indicating if this type is a complex type. + */ + @JsonProperty(value = "isComplexType") + private Boolean isComplexType; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlType object itself. + */ + public USqlType withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this table and database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this table and database. + * + * @param schemaName the schemaName value to set + * @return the USqlType object itself. + */ + public USqlType withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of type for this type. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of type for this type. + * + * @param name the name value to set + * @return the USqlType object itself. + */ + public USqlType withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type family for this type. + * + * @return the typeFamily value + */ + public String typeFamily() { + return this.typeFamily; + } + + /** + * Set the type family for this type. + * + * @param typeFamily the typeFamily value to set + * @return the USqlType object itself. + */ + public USqlType withTypeFamily(String typeFamily) { + this.typeFamily = typeFamily; + return this; + } + + /** + * Get the C# name for this type. + * + * @return the cSharpName value + */ + public String cSharpName() { + return this.cSharpName; + } + + /** + * Set the C# name for this type. + * + * @param cSharpName the cSharpName value to set + * @return the USqlType object itself. + */ + public USqlType withCSharpName(String cSharpName) { + this.cSharpName = cSharpName; + return this; + } + + /** + * Get the fully qualified C# name for this type. + * + * @return the fullCSharpName value + */ + public String fullCSharpName() { + return this.fullCSharpName; + } + + /** + * Set the fully qualified C# name for this type. + * + * @param fullCSharpName the fullCSharpName value to set + * @return the USqlType object itself. + */ + public USqlType withFullCSharpName(String fullCSharpName) { + this.fullCSharpName = fullCSharpName; + return this; + } + + /** + * Get the system type ID for this type. + * + * @return the systemTypeId value + */ + public Integer systemTypeId() { + return this.systemTypeId; + } + + /** + * Set the system type ID for this type. + * + * @param systemTypeId the systemTypeId value to set + * @return the USqlType object itself. + */ + public USqlType withSystemTypeId(Integer systemTypeId) { + this.systemTypeId = systemTypeId; + return this; + } + + /** + * Get the user type ID for this type. + * + * @return the userTypeId value + */ + public Integer userTypeId() { + return this.userTypeId; + } + + /** + * Set the user type ID for this type. + * + * @param userTypeId the userTypeId value to set + * @return the USqlType object itself. + */ + public USqlType withUserTypeId(Integer userTypeId) { + this.userTypeId = userTypeId; + return this; + } + + /** + * Get the schema ID for this type. + * + * @return the schemaId value + */ + public Integer schemaId() { + return this.schemaId; + } + + /** + * Set the schema ID for this type. + * + * @param schemaId the schemaId value to set + * @return the USqlType object itself. + */ + public USqlType withSchemaId(Integer schemaId) { + this.schemaId = schemaId; + return this; + } + + /** + * Get the principal ID for this type. + * + * @return the principalId value + */ + public Integer principalId() { + return this.principalId; + } + + /** + * Set the principal ID for this type. + * + * @param principalId the principalId value to set + * @return the USqlType object itself. + */ + public USqlType withPrincipalId(Integer principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the the switch indicating if this type is nullable. + * + * @return the isNullable value + */ + public Boolean isNullable() { + return this.isNullable; + } + + /** + * Set the the switch indicating if this type is nullable. + * + * @param isNullable the isNullable value to set + * @return the USqlType object itself. + */ + public USqlType withIsNullable(Boolean isNullable) { + this.isNullable = isNullable; + return this; + } + + /** + * Get the the switch indicating if this type is user defined. + * + * @return the isUserDefined value + */ + public Boolean isUserDefined() { + return this.isUserDefined; + } + + /** + * Set the the switch indicating if this type is user defined. + * + * @param isUserDefined the isUserDefined value to set + * @return the USqlType object itself. + */ + public USqlType withIsUserDefined(Boolean isUserDefined) { + this.isUserDefined = isUserDefined; + return this; + } + + /** + * Get the the switch indicating if this type is an assembly type. + * + * @return the isAssemblyType value + */ + public Boolean isAssemblyType() { + return this.isAssemblyType; + } + + /** + * Set the the switch indicating if this type is an assembly type. + * + * @param isAssemblyType the isAssemblyType value to set + * @return the USqlType object itself. + */ + public USqlType withIsAssemblyType(Boolean isAssemblyType) { + this.isAssemblyType = isAssemblyType; + return this; + } + + /** + * Get the the switch indicating if this type is a table type. + * + * @return the isTableType value + */ + public Boolean isTableType() { + return this.isTableType; + } + + /** + * Set the the switch indicating if this type is a table type. + * + * @param isTableType the isTableType value to set + * @return the USqlType object itself. + */ + public USqlType withIsTableType(Boolean isTableType) { + this.isTableType = isTableType; + return this; + } + + /** + * Get the the switch indicating if this type is a complex type. + * + * @return the isComplexType value + */ + public Boolean isComplexType() { + return this.isComplexType; + } + + /** + * Set the the switch indicating if this type is a complex type. + * + * @param isComplexType the isComplexType value to set + * @return the USqlType object itself. + */ + public USqlType withIsComplexType(Boolean isComplexType) { + this.isComplexType = isComplexType; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlView.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlView.java new file mode 100644 index 000000000000..f2b02dcb99b4 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/USqlView.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics catalog U-SQL view item. + */ +public class USqlView extends CatalogItem { + /** + * the name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * the name of the schema associated with this view and database. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * the name of the view. + */ + @JsonProperty(value = "viewName") + private String name; + + /** + * the defined query of the view. + */ + @JsonProperty(value = "definition") + private String definition; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database. + * + * @param databaseName the databaseName value to set + * @return the USqlView object itself. + */ + public USqlView withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the name of the schema associated with this view and database. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the name of the schema associated with this view and database. + * + * @param schemaName the schemaName value to set + * @return the USqlView object itself. + */ + public USqlView withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the name of the view. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the view. + * + * @param name the name value to set + * @return the USqlView object itself. + */ + public USqlView withName(String name) { + this.name = name; + return this; + } + + /** + * Get the defined query of the view. + * + * @return the definition value + */ + public String definition() { + return this.definition; + } + + /** + * Set the defined query of the view. + * + * @param definition the definition value to set + * @return the USqlView object itself. + */ + public USqlView withDefinition(String definition) { + this.definition = definition; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/UpdateJobParameters.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/UpdateJobParameters.java new file mode 100644 index 000000000000..245a31c73774 --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/UpdateJobParameters.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.datalake.analytics.models; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters that can be used to update existing Data Lake Analytics job + * information properties. (Only for use internally with Scope job type.). + */ +public class UpdateJobParameters { + /** + * The degree of parallelism used for this job. + */ + @JsonProperty(value = "degreeOfParallelism") + private Integer degreeOfParallelism; + + /** + * the degree of parallelism in percentage used for this job. + */ + @JsonProperty(value = "degreeOfParallelismPercent") + private Double degreeOfParallelismPercent; + + /** + * The priority value for the current job. Lower numbers have a higher + * priority. By default, a job has a priority of 1000. This must be greater + * than 0. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /** + * The key-value pairs used to add additional metadata to the job + * information. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the degree of parallelism used for this job. + * + * @return the degreeOfParallelism value + */ + public Integer degreeOfParallelism() { + return this.degreeOfParallelism; + } + + /** + * Set the degree of parallelism used for this job. + * + * @param degreeOfParallelism the degreeOfParallelism value to set + * @return the UpdateJobParameters object itself. + */ + public UpdateJobParameters withDegreeOfParallelism(Integer degreeOfParallelism) { + this.degreeOfParallelism = degreeOfParallelism; + return this; + } + + /** + * Get the degree of parallelism in percentage used for this job. + * + * @return the degreeOfParallelismPercent value + */ + public Double degreeOfParallelismPercent() { + return this.degreeOfParallelismPercent; + } + + /** + * Set the degree of parallelism in percentage used for this job. + * + * @param degreeOfParallelismPercent the degreeOfParallelismPercent value to set + * @return the UpdateJobParameters object itself. + */ + public UpdateJobParameters withDegreeOfParallelismPercent(Double degreeOfParallelismPercent) { + this.degreeOfParallelismPercent = degreeOfParallelismPercent; + return this; + } + + /** + * Get the priority value for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority value for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0. + * + * @param priority the priority value to set + * @return the UpdateJobParameters object itself. + */ + public UpdateJobParameters withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the key-value pairs used to add additional metadata to the job information. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the key-value pairs used to add additional metadata to the job information. + * + * @param tags the tags value to set + * @return the UpdateJobParameters object itself. + */ + public UpdateJobParameters withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/package-info.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/package-info.java new file mode 100644 index 000000000000..3cfd565f6ead --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the models classes for DataLakeAnalyticsCatalogManagementClient. + * Creates an Azure Data Lake Analytics catalog client. + */ +package com.microsoft.azure.datalake.analytics.models; diff --git a/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/package-info.java b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/package-info.java new file mode 100644 index 000000000000..4e17e437c53f --- /dev/null +++ b/azure-datalake/analytics/src/main/java/com/microsoft/azure/datalake/analytics/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for DataLakeAnalyticsCatalogManagementClient. + * Creates an Azure Data Lake Analytics catalog client. + */ +package com.microsoft.azure.datalake.analytics;