From 3615a8d2da95767a57f0c3f4633789ed6d58c6d0 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Wed, 10 Oct 2018 15:09:02 -0700 Subject: [PATCH] Add data lake analytics and store (#2477) * Add data lake analytics and store * Update poms for data lake libraries --- api-specs.json | 8 + .../v2015_10_01_preview/pom.xml | 133 + .../v2015_10_01_preview/Accounts.java | 164 + .../AddDataLakeStoreParameters.java | 43 + .../AddStorageAccountParameters.java | 43 + .../AzureAsyncOperationResult.java | 55 + .../v2015_10_01_preview/BlobContainer.java | 42 + .../BlobContainerProperties.java | 33 + .../DataLakeAnalyticsAccount.java | 97 + .../DataLakeAnalyticsAccountProperties.java | 231 ++ .../DataLakeAnalyticsAccountState.java | 53 + .../DataLakeAnalyticsAccountStatus.java | 74 + .../DataLakeStoreAccountInfo.java | 30 + .../DataLakeStoreAccountInfoProperties.java | 43 + .../v2015_10_01_preview/Error.java | 93 + .../v2015_10_01_preview/ErrorDetails.java | 63 + .../v2015_10_01_preview/InnerError.java | 47 + .../v2015_10_01_preview/OperationStatus.java | 56 + .../v2015_10_01_preview/SasTokenInfo.java | 25 + .../StorageAccountInfo.java | 30 + .../StorageAccountProperties.java | 70 + .../implementation/AccountsImpl.java | 319 ++ .../implementation/AccountsInner.java | 3597 +++++++++++++++++ .../implementation/BlobContainerImpl.java | 66 + .../implementation/BlobContainerInner.java | 78 + .../DataLakeAnalyticsAccountImpl.java | 58 + .../DataLakeAnalyticsAccountInner.java | 49 + ...eAnalyticsAccountManagementClientImpl.java | 196 + .../DataLakeAnalyticsManager.java | 99 + .../DataLakeStoreAccountInfoImpl.java | 44 + .../DataLakeStoreAccountInfoInner.java | 70 + .../implementation/IdParsingUtils.java | 57 + .../implementation/PageImpl.java | 75 + .../implementation/SasTokenInfoImpl.java | 31 + .../implementation/SasTokenInfoInner.java | 32 + .../StorageAccountInfoImpl.java | 44 + .../StorageAccountInfoInner.java | 70 + .../implementation/package-info.java | 11 + .../v2015_10_01_preview/package-info.java | 11 + .../resource-manager/v2016_11_01/pom.xml | 133 + .../v2016_11_01/AADObjectType.java | 44 + .../v2016_11_01/Accounts.java | 35 + .../AddDataLakeStoreParameters.java | 45 + ...AddDataLakeStoreWithAccountParameters.java | 72 + .../AddStorageAccountParameters.java | 72 + ...ddStorageAccountWithAccountParameters.java | 99 + .../v2016_11_01/CapabilityInformation.java | 46 + .../CheckNameAvailabilityParameters.java | 78 + .../v2016_11_01/ComputePolicies.java | 53 + .../v2016_11_01/ComputePolicy.java | 205 + ...ateComputePolicyWithAccountParameters.java | 156 + ...ateDataLakeAnalyticsAccountParameters.java | 418 ++ ...eateFirewallRuleWithAccountParameters.java | 100 + ...CreateOrUpdateComputePolicyParameters.java | 129 + .../CreateOrUpdateFirewallRuleParameters.java | 73 + .../v2016_11_01/DataLakeAnalyticsAccount.java | 481 +++ .../DataLakeAnalyticsAccountState.java | 53 + .../DataLakeAnalyticsAccountStatus.java | 80 + .../DataLakeStoreAccountInformation.java | 42 + .../v2016_11_01/DataLakeStoreAccounts.java | 63 + .../FirewallAllowAzureIpsState.java | 53 + .../v2016_11_01/FirewallRule.java | 146 + .../v2016_11_01/FirewallRules.java | 53 + .../v2016_11_01/FirewallState.java | 53 + .../v2016_11_01/Locations.java | 28 + .../NameAvailabilityInformation.java | 35 + .../v2016_11_01/OperationDisplay.java | 77 + .../v2016_11_01/OperationListResult.java | 32 + .../v2016_11_01/OperationOrigin.java | 44 + .../v2016_11_01/Operations.java | 27 + .../v2016_11_01/SasTokenInformation.java | 25 + .../StorageAccountInformation.java | 42 + .../v2016_11_01/StorageAccounts.java | 111 + .../v2016_11_01/StorageContainer.java | 43 + .../v2016_11_01/SubscriptionState.java | 50 + .../v2016_11_01/TierType.java | 74 + .../UpdateComputePolicyParameters.java | 129 + ...ateComputePolicyWithAccountParameters.java | 156 + ...ateDataLakeAnalyticsAccountParameters.java | 369 ++ ...ateDataLakeStoreWithAccountParameters.java | 72 + .../UpdateFirewallRuleParameters.java | 73 + ...dateFirewallRuleWithAccountParameters.java | 100 + .../UpdateStorageAccountParameters.java | 72 + ...teStorageAccountWithAccountParameters.java | 99 + .../implementation/AccountsImpl.java | 203 + .../implementation/AccountsInner.java | 1662 ++++++++ .../CapabilityInformationImpl.java | 53 + .../CapabilityInformationInner.java | 95 + .../implementation/ComputePoliciesImpl.java | 81 + .../implementation/ComputePoliciesInner.java | 799 ++++ .../implementation/ComputePolicyImpl.java | 183 + .../implementation/ComputePolicyInner.java | 114 + .../DataLakeAnalyticsAccountBasicInner.java | 121 + .../DataLakeAnalyticsAccountImpl.java | 362 ++ .../DataLakeAnalyticsAccountInner.java | 381 ++ ...eAnalyticsAccountManagementClientImpl.java | 280 ++ .../DataLakeAnalyticsManager.java | 171 + .../DataLakeStoreAccountInformationImpl.java | 63 + .../DataLakeStoreAccountInformationInner.java | 65 + .../DataLakeStoreAccountsImpl.java | 78 + .../DataLakeStoreAccountsInner.java | 841 ++++ .../implementation/FirewallRuleImpl.java | 151 + .../implementation/FirewallRuleInner.java | 82 + .../implementation/FirewallRulesImpl.java | 81 + .../implementation/FirewallRulesInner.java | 799 ++++ .../implementation/IdParsingUtils.java | 57 + .../implementation/LocationsImpl.java | 42 + .../implementation/LocationsInner.java | 140 + .../NameAvailabilityInformationImpl.java | 41 + .../NameAvailabilityInformationInner.java | 65 + .../implementation/OperationInner.java | 65 + .../OperationListResultImpl.java | 37 + .../OperationListResultInner.java | 48 + .../implementation/OperationsImpl.java | 42 + .../implementation/OperationsInner.java | 128 + .../v2016_11_01/implementation/PageImpl.java | 75 + .../SasTokenInformationImpl.java | 31 + .../SasTokenInformationInner.java | 32 + .../StorageAccountInformationImpl.java | 63 + .../StorageAccountInformationInner.java | 65 + .../implementation/StorageAccountsImpl.java | 148 + .../implementation/StorageAccountsInner.java | 1560 +++++++ .../implementation/StorageContainerImpl.java | 66 + .../implementation/StorageContainerInner.java | 66 + .../implementation/package-info.java | 11 + .../v2016_11_01/package-info.java | 11 + .../v2015_10_01_preview/pom.xml | 133 + .../v2015_10_01_preview/Accounts.java | 76 + .../AzureAsyncOperationResult.java | 55 + .../DataLakeStoreAccount.java | 126 + .../DataLakeStoreAccountProperties.java | 203 + .../DataLakeStoreAccountState.java | 53 + .../DataLakeStoreAccountStatus.java | 74 + .../v2015_10_01_preview/EncryptionConfig.java | 72 + .../EncryptionConfigType.java | 53 + .../EncryptionIdentity.java | 75 + .../EncryptionIdentityType.java | 50 + .../EncryptionProvisioningState.java | 53 + .../v2015_10_01_preview/EncryptionState.java | 53 + .../v2015_10_01_preview/Error.java | 93 + .../v2015_10_01_preview/ErrorDetails.java | 63 + .../v2015_10_01_preview/FirewallRule.java | 194 + .../FirewallRuleProperties.java | 69 + .../v2015_10_01_preview/InnerError.java | 47 + .../v2015_10_01_preview/KeyVaultMetaInfo.java | 96 + .../v2015_10_01_preview/OperationStatus.java | 56 + .../implementation/AccountsImpl.java | 202 + .../implementation/AccountsInner.java | 2091 ++++++++++ .../DataLakeStoreAccountImpl.java | 70 + .../DataLakeStoreAccountInner.java | 73 + ...aLakeStoreAccountManagementClientImpl.java | 196 + .../implementation/DataLakeStoreManager.java | 99 + .../implementation/FirewallRuleImpl.java | 129 + .../implementation/FirewallRuleInner.java | 137 + .../implementation/IdParsingUtils.java | 57 + .../implementation/PageImpl.java | 75 + .../implementation/package-info.java | 11 + .../v2015_10_01_preview/package-info.java | 11 + .../resource-manager/v2016_11_01/pom.xml | 133 + .../datalakestore/v2016_11_01/Accounts.java | 46 + .../v2016_11_01/CapabilityInformation.java | 46 + .../CheckNameAvailabilityParameters.java | 78 + .../CreateDataLakeStoreAccountParameters.java | 369 ++ ...eateFirewallRuleWithAccountParameters.java | 100 + .../CreateOrUpdateFirewallRuleParameters.java | 73 + ...teOrUpdateTrustedIdProviderParameters.java | 45 + ...eOrUpdateVirtualNetworkRuleParameters.java | 45 + ...rustedIdProviderWithAccountParameters.java | 72 + ...rtualNetworkRuleWithAccountParameters.java | 72 + .../v2016_11_01/DataLakeStoreAccount.java | 406 ++ .../DataLakeStoreAccountState.java | 53 + .../DataLakeStoreAccountStatus.java | 80 + .../v2016_11_01/EncryptionConfig.java | 72 + .../v2016_11_01/EncryptionConfigType.java | 53 + .../v2016_11_01/EncryptionIdentity.java | 82 + .../EncryptionProvisioningState.java | 53 + .../v2016_11_01/EncryptionState.java | 53 + .../FirewallAllowAzureIpsState.java | 53 + .../v2016_11_01/FirewallRule.java | 146 + .../v2016_11_01/FirewallRules.java | 53 + .../v2016_11_01/FirewallState.java | 53 + .../v2016_11_01/KeyVaultMetaInfo.java | 96 + .../datalakestore/v2016_11_01/Locations.java | 28 + .../NameAvailabilityInformation.java | 35 + .../v2016_11_01/OperationDisplay.java | 77 + .../v2016_11_01/OperationListResult.java | 32 + .../v2016_11_01/OperationOrigin.java | 44 + .../datalakestore/v2016_11_01/Operations.java | 27 + .../v2016_11_01/SubscriptionState.java | 50 + .../datalakestore/v2016_11_01/TierType.java | 68 + .../v2016_11_01/TrustedIdProvider.java | 117 + .../v2016_11_01/TrustedIdProviderState.java | 53 + .../v2016_11_01/TrustedIdProviders.java | 53 + .../UpdateDataLakeStoreAccountParameters.java | 295 ++ .../v2016_11_01/UpdateEncryptionConfig.java | 43 + .../UpdateFirewallRuleParameters.java | 73 + ...dateFirewallRuleWithAccountParameters.java | 100 + .../v2016_11_01/UpdateKeyVaultMetaInfo.java | 44 + .../UpdateTrustedIdProviderParameters.java | 45 + ...rustedIdProviderWithAccountParameters.java | 72 + .../UpdateVirtualNetworkRuleParameters.java | 45 + ...rtualNetworkRuleWithAccountParameters.java | 72 + .../v2016_11_01/VirtualNetworkRule.java | 117 + .../v2016_11_01/VirtualNetworkRules.java | 53 + .../implementation/AccountsImpl.java | 209 + .../implementation/AccountsInner.java | 1608 ++++++++ .../CapabilityInformationImpl.java | 53 + .../CapabilityInformationInner.java | 95 + .../DataLakeStoreAccountBasicInner.java | 120 + .../DataLakeStoreAccountImpl.java | 320 ++ .../DataLakeStoreAccountInner.java | 338 ++ ...aLakeStoreAccountManagementClientImpl.java | 266 ++ .../implementation/DataLakeStoreManager.java | 159 + .../implementation/FirewallRuleImpl.java | 151 + .../implementation/FirewallRuleInner.java | 82 + .../implementation/FirewallRulesImpl.java | 81 + .../implementation/FirewallRulesInner.java | 799 ++++ .../implementation/IdParsingUtils.java | 57 + .../implementation/LocationsImpl.java | 42 + .../implementation/LocationsInner.java | 140 + .../NameAvailabilityInformationImpl.java | 41 + .../NameAvailabilityInformationInner.java | 65 + .../implementation/OperationInner.java | 76 + .../OperationListResultImpl.java | 37 + .../OperationListResultInner.java | 48 + .../implementation/OperationsImpl.java | 42 + .../implementation/OperationsInner.java | 128 + .../v2016_11_01/implementation/PageImpl.java | 75 + .../implementation/TrustedIdProviderImpl.java | 136 + .../TrustedIdProviderInner.java | 65 + .../TrustedIdProvidersImpl.java | 81 + .../TrustedIdProvidersInner.java | 799 ++++ .../VirtualNetworkRuleImpl.java | 136 + .../VirtualNetworkRuleInner.java | 65 + .../VirtualNetworkRulesImpl.java | 81 + .../VirtualNetworkRulesInner.java | 799 ++++ .../implementation/package-info.java | 11 + .../v2016_11_01/package-info.java | 11 + 238 files changed, 36174 insertions(+) create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/pom.xml create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Accounts.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddDataLakeStoreParameters.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddStorageAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AzureAsyncOperationResult.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainer.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainerProperties.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccount.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountProperties.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountState.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountStatus.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfo.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfoProperties.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Error.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/ErrorDetails.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/InnerError.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/OperationStatus.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/SasTokenInfo.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountInfo.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountProperties.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerInner.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountInner.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountManagementClientImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsManager.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoInner.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/IdParsingUtils.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/PageImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoInner.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoImpl.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoInner.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/package-info.java create mode 100644 datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/package-info.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/pom.xml create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AADObjectType.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Accounts.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CapabilityInformation.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CheckNameAvailabilityParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicies.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicy.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateComputePolicyWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateDataLakeAnalyticsAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateFirewallRuleWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateComputePolicyParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateFirewallRuleParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccount.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountState.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountStatus.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccountInformation.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccounts.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallAllowAzureIpsState.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRule.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRules.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallState.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Locations.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/NameAvailabilityInformation.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationDisplay.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationListResult.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationOrigin.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Operations.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SasTokenInformation.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccountInformation.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccounts.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageContainer.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SubscriptionState.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/TierType.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeAnalyticsAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeStoreWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountWithAccountParameters.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountBasicInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountManagementClientImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsManager.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/IdParsingUtils.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/PageImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerImpl.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerInner.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/package-info.java create mode 100644 datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/package-info.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/pom.xml create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Accounts.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/AzureAsyncOperationResult.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccount.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountProperties.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountState.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountStatus.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfig.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfigType.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentity.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentityType.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionProvisioningState.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionState.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Error.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/ErrorDetails.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRule.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRuleProperties.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/InnerError.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/KeyVaultMetaInfo.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/OperationStatus.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsImpl.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountImpl.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountInner.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountManagementClientImpl.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreManager.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleImpl.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleInner.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/IdParsingUtils.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/PageImpl.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/package-info.java create mode 100644 datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/package-info.java create mode 100644 datalakestore/resource-manager/v2016_11_01/pom.xml create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Accounts.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CapabilityInformation.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CheckNameAvailabilityParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateDataLakeStoreAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateFirewallRuleWithAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateFirewallRuleParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateTrustedIdProviderParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateVirtualNetworkRuleParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateTrustedIdProviderWithAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateVirtualNetworkRuleWithAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccount.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountState.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountStatus.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfig.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfigType.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionIdentity.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionProvisioningState.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionState.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallAllowAzureIpsState.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRule.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRules.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallState.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/KeyVaultMetaInfo.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Locations.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/NameAvailabilityInformation.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationDisplay.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationListResult.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationOrigin.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Operations.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/SubscriptionState.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TierType.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProvider.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviderState.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviders.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateDataLakeStoreAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateEncryptionConfig.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateKeyVaultMetaInfo.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderWithAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleWithAccountParameters.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRule.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRules.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountBasicInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountManagementClientImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreManager.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/IdParsingUtils.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/PageImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesImpl.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesInner.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/package-info.java create mode 100644 datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/package-info.java diff --git a/api-specs.json b/api-specs.json index c1ba34bf48351..a942a45d0c703 100644 --- a/api-specs.json +++ b/api-specs.json @@ -42,6 +42,14 @@ "source": "specification/containerregistry/resource-manager/readme.md", "args": "--multiapi=true --fluent=true" }, + "datalakeanalytics/resource-manager": { + "source": "specification/datalake-analytics/resource-manager/readme.md", + "args": "--multiapi --fluent" + }, + "datalakestore/resource-manager": { + "source": "specification/datalake-store/resource-manager/readme.md", + "args": "--multiapi --fluent" + }, "dns/resource-manager": { "source": "specification/dns/resource-manager/readme.md", "args": "--multiapi --fluent" diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/pom.xml b/datalakeanalytics/resource-manager/v2015_10_01_preview/pom.xml new file mode 100644 index 0000000000000..648468c5d4020 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.datalakeanalytics.v2015_10_01_preview + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-datalakeanalytics + 1.0.0-beta-2 + jar + Microsoft Azure SDK for DataLakeAnalytics Management + This package contains Microsoft DataLakeAnalytics Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Accounts.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Accounts.java new file mode 100644 index 0000000000000..ef77cbd9be9af --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Accounts.java @@ -0,0 +1,164 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.AccountsInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.StorageAccountInfo; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.BlobContainer; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeStoreAccountInfo; + +/** + * Type representing Accounts. + */ +public interface Accounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable addStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters); + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable addDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters); + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve Azure storage account details. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName); + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStorageAccountsAsync(final String resourceGroupName, final String accountName); + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName); + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to modify storage accounts in + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable updateStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters); + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to retrieve blob container. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName); + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage blob containers. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName); + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which an Azure Storage account's SAS token is being requested. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName); + + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve the Data Lake Store account details. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName); + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listDataLakeStoreAccountsAsync(final String resourceGroupName, final String accountName); + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName); + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddDataLakeStoreParameters.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddDataLakeStoreParameters.java new file mode 100644 index 0000000000000..f4e6dce99a108 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddDataLakeStoreParameters.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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Additional Data Lake Store parameters. + */ +public class AddDataLakeStoreParameters { + /** + * the properties for the Data Lake Store account being added. + */ + @JsonProperty(value = "properties", required = true) + private DataLakeStoreAccountInfoProperties properties; + + /** + * Get the properties for the Data Lake Store account being added. + * + * @return the properties value + */ + public DataLakeStoreAccountInfoProperties properties() { + return this.properties; + } + + /** + * Set the properties for the Data Lake Store account being added. + * + * @param properties the properties value to set + * @return the AddDataLakeStoreParameters object itself. + */ + public AddDataLakeStoreParameters withProperties(DataLakeStoreAccountInfoProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddStorageAccountParameters.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddStorageAccountParameters.java new file mode 100644 index 0000000000000..a6f2e94b3ca15 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AddStorageAccountParameters.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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Additional Azure Storage account parameters. + */ +public class AddStorageAccountParameters { + /** + * the properties for the Azure Storage account being added. + */ + @JsonProperty(value = "properties", required = true) + private StorageAccountProperties properties; + + /** + * Get the properties for the Azure Storage account being added. + * + * @return the properties value + */ + public StorageAccountProperties properties() { + return this.properties; + } + + /** + * Set the properties for the Azure Storage account being added. + * + * @param properties the properties value to set + * @return the AddStorageAccountParameters object itself. + */ + public AddStorageAccountParameters withProperties(StorageAccountProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AzureAsyncOperationResult.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AzureAsyncOperationResult.java new file mode 100644 index 0000000000000..fec3f5cea72ea --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/AzureAsyncOperationResult.java @@ -0,0 +1,55 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The response body contains the status of the specified asynchronous + * operation, indicating whether it has succeeded, is inprogress, or has + * failed. Note that this status is distinct from the HTTP status code returned + * for the Get Operation Status operation itself. If the asynchronous operation + * succeeded, the response body includes the HTTP status code for the + * successful request. If the asynchronous operation failed, the response body + * includes the HTTP status code for the failed request and error information + * regarding the failure. + */ +public class AzureAsyncOperationResult { + /** + * the status of the AzureAsuncOperation. Possible values include: + * 'InProgress', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus status; + + /** + * The error property. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private Error error; + + /** + * Get the status of the AzureAsuncOperation. Possible values include: 'InProgress', 'Succeeded', 'Failed'. + * + * @return the status value + */ + public OperationStatus status() { + return this.status; + } + + /** + * Get the error value. + * + * @return the error value + */ + public Error error() { + return this.error; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainer.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainer.java new file mode 100644 index 0000000000000..6c6e2ca84a0ab --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainer.java @@ -0,0 +1,42 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.BlobContainerInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeAnalyticsManager; + +/** + * Type representing BlobContainer. + */ +public interface BlobContainer extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + BlobContainerProperties properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainerProperties.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainerProperties.java new file mode 100644 index 0000000000000..b9ec3cbf7d240 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/BlobContainerProperties.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.management.datalakeanalytics.v2015_10_01_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Storage blob container properties information. + */ +public class BlobContainerProperties { + /** + * the last modified time of the blob container. + */ + @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * Get the last modified time of the blob container. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccount.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccount.java new file mode 100644 index 0000000000000..bee9c1e0b5a4b --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccount.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.management.datalakeanalytics.v2015_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeAnalyticsManager; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeAnalyticsAccountInner; + +/** + * Type representing DataLakeAnalyticsAccount. + */ +public interface DataLakeAnalyticsAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the properties value. + */ + DataLakeAnalyticsAccountProperties properties(); + + /** + * The entirety of the DataLakeAnalyticsAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataLakeAnalyticsAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataLakeAnalyticsAccount definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DataLakeAnalyticsAccount definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties the properties defined by Data Lake Analytics all properties are specific to each resource provider + * @return the next definition stage + */ + WithCreate withProperties(DataLakeAnalyticsAccountProperties properties); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithProperties { + } + } + /** + * The template for a DataLakeAnalyticsAccount update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithProperties { + } + + /** + * Grouping of DataLakeAnalyticsAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the datalakeanalyticsaccount update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties the properties defined by Data Lake Analytics all properties are specific to each resource provider + * @return the next update stage + */ + Update withProperties(DataLakeAnalyticsAccountProperties properties); + } + + } +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountProperties.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountProperties.java new file mode 100644 index 0000000000000..2161ad56918ab --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountProperties.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.management.datalakeanalytics.v2015_10_01_preview; + +import java.util.List; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeStoreAccountInfoInner; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.StorageAccountInfoInner; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The account specific properties that are associated with an underlying Data + * Lake Analytics account. + */ +public class DataLakeAnalyticsAccountProperties { + /** + * the provisioning status of the Data Lake Analytics account. Possible + * values include: 'Failed', 'Creating', 'Running', 'Succeeded', + * 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeAnalyticsAccountStatus provisioningState; + + /** + * the state of the Data Lake Analytics account. Possible values include: + * 'active', 'suspended'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeAnalyticsAccountState state; + + /** + * the default data lake storage account associated with this Data Lake + * Analytics account. + */ + @JsonProperty(value = "defaultDataLakeStoreAccount") + private String defaultDataLakeStoreAccount; + + /** + * the maximum supported degree of parallelism for this account. + */ + @JsonProperty(value = "maxDegreeOfParallelism") + private Integer maxDegreeOfParallelism; + + /** + * the maximum supported jobs running under the account at the same time. + */ + @JsonProperty(value = "maxJobCount") + private Integer maxJobCount; + + /** + * the list of Data Lake storage accounts associated with this account. + */ + @JsonProperty(value = "dataLakeStoreAccounts") + private List dataLakeStoreAccounts; + + /** + * the list of Azure Blob storage accounts associated with this account. + */ + @JsonProperty(value = "storageAccounts") + private List storageAccounts; + + /** + * the account creation time. + */ + @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * the account last modified time. + */ + @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * the full CName endpoint for this account. + */ + @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /** + * Get the provisioning status of the Data Lake Analytics account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted'. + * + * @return the provisioningState value + */ + public DataLakeAnalyticsAccountStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the state of the Data Lake Analytics account. Possible values include: 'active', 'suspended'. + * + * @return the state value + */ + public DataLakeAnalyticsAccountState state() { + return this.state; + } + + /** + * Get the default data lake storage account associated with this Data Lake Analytics account. + * + * @return the defaultDataLakeStoreAccount value + */ + public String defaultDataLakeStoreAccount() { + return this.defaultDataLakeStoreAccount; + } + + /** + * Set the default data lake storage account associated with this Data Lake Analytics account. + * + * @param defaultDataLakeStoreAccount the defaultDataLakeStoreAccount value to set + * @return the DataLakeAnalyticsAccountProperties object itself. + */ + public DataLakeAnalyticsAccountProperties withDefaultDataLakeStoreAccount(String defaultDataLakeStoreAccount) { + this.defaultDataLakeStoreAccount = defaultDataLakeStoreAccount; + return this; + } + + /** + * Get the maximum supported degree of parallelism for this account. + * + * @return the maxDegreeOfParallelism value + */ + public Integer maxDegreeOfParallelism() { + return this.maxDegreeOfParallelism; + } + + /** + * Set the maximum supported degree of parallelism for this account. + * + * @param maxDegreeOfParallelism the maxDegreeOfParallelism value to set + * @return the DataLakeAnalyticsAccountProperties object itself. + */ + public DataLakeAnalyticsAccountProperties withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism) { + this.maxDegreeOfParallelism = maxDegreeOfParallelism; + return this; + } + + /** + * Get the maximum supported jobs running under the account at the same time. + * + * @return the maxJobCount value + */ + public Integer maxJobCount() { + return this.maxJobCount; + } + + /** + * Set the maximum supported jobs running under the account at the same time. + * + * @param maxJobCount the maxJobCount value to set + * @return the DataLakeAnalyticsAccountProperties object itself. + */ + public DataLakeAnalyticsAccountProperties withMaxJobCount(Integer maxJobCount) { + this.maxJobCount = maxJobCount; + return this; + } + + /** + * Get the list of Data Lake storage accounts associated with this account. + * + * @return the dataLakeStoreAccounts value + */ + public List dataLakeStoreAccounts() { + return this.dataLakeStoreAccounts; + } + + /** + * Set the list of Data Lake storage accounts associated with this account. + * + * @param dataLakeStoreAccounts the dataLakeStoreAccounts value to set + * @return the DataLakeAnalyticsAccountProperties object itself. + */ + public DataLakeAnalyticsAccountProperties withDataLakeStoreAccounts(List dataLakeStoreAccounts) { + this.dataLakeStoreAccounts = dataLakeStoreAccounts; + return this; + } + + /** + * Get the list of Azure Blob storage accounts associated with this account. + * + * @return the storageAccounts value + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the list of Azure Blob storage accounts associated with this account. + * + * @param storageAccounts the storageAccounts value to set + * @return the DataLakeAnalyticsAccountProperties object itself. + */ + public DataLakeAnalyticsAccountProperties withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + + /** + * Get the account creation time. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get the account last modified time. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the full CName endpoint for this account. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountState.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountState.java new file mode 100644 index 0000000000000..2489fb4c9facc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountState.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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeAnalyticsAccountState. + */ +public enum DataLakeAnalyticsAccountState { + /** Enum value active. */ + ACTIVE("active"), + + /** Enum value suspended. */ + SUSPENDED("suspended"); + + /** The actual serialized value for a DataLakeAnalyticsAccountState instance. */ + private String value; + + DataLakeAnalyticsAccountState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeAnalyticsAccountState instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeAnalyticsAccountState object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeAnalyticsAccountState fromString(String value) { + DataLakeAnalyticsAccountState[] items = DataLakeAnalyticsAccountState.values(); + for (DataLakeAnalyticsAccountState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountStatus.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountStatus.java new file mode 100644 index 0000000000000..6f9f4f6f2a4b7 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeAnalyticsAccountStatus.java @@ -0,0 +1,74 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeAnalyticsAccountStatus. + */ +public enum DataLakeAnalyticsAccountStatus { + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Patching. */ + PATCHING("Patching"), + + /** Enum value Suspending. */ + SUSPENDING("Suspending"), + + /** Enum value Resuming. */ + RESUMING("Resuming"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Deleted. */ + DELETED("Deleted"); + + /** The actual serialized value for a DataLakeAnalyticsAccountStatus instance. */ + private String value; + + DataLakeAnalyticsAccountStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeAnalyticsAccountStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeAnalyticsAccountStatus object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeAnalyticsAccountStatus fromString(String value) { + DataLakeAnalyticsAccountStatus[] items = DataLakeAnalyticsAccountStatus.values(); + for (DataLakeAnalyticsAccountStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfo.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfo.java new file mode 100644 index 0000000000000..78ef4170bfacc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfo.java @@ -0,0 +1,30 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeStoreAccountInfoInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeAnalyticsManager; + +/** + * Type representing DataLakeStoreAccountInfo. + */ +public interface DataLakeStoreAccountInfo extends HasInner, HasManager { + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + DataLakeStoreAccountInfoProperties properties(); + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfoProperties.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfoProperties.java new file mode 100644 index 0000000000000..fafb220294565 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/DataLakeStoreAccountInfoProperties.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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store account properties information. + */ +public class DataLakeStoreAccountInfoProperties { + /** + * the optional suffix for the Data Lake Store account. + */ + @JsonProperty(value = "suffix") + private String suffix; + + /** + * Get the optional suffix for the Data Lake Store account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the Data Lake Store account. + * + * @param suffix the suffix value to set + * @return the DataLakeStoreAccountInfoProperties object itself. + */ + public DataLakeStoreAccountInfoProperties withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Error.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Error.java new file mode 100644 index 0000000000000..3b2790b2455b0 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/Error.java @@ -0,0 +1,93 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Generic resource error information. + */ +public class Error { + /** + * the HTTP status code or error code associated with this error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * the error message to display. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * the target of the error. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * the list of error details. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; + + /** + * the inner exceptions or errors, if any. + */ + @JsonProperty(value = "innerError", access = JsonProperty.Access.WRITE_ONLY) + private InnerError innerError; + + /** + * Get the HTTP status code or error code associated with this error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message to display. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the target of the error. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Get the list of error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Get the inner exceptions or errors, if any. + * + * @return the innerError value + */ + public InnerError innerError() { + return this.innerError; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/ErrorDetails.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/ErrorDetails.java new file mode 100644 index 0000000000000..5b33c841d15db --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/ErrorDetails.java @@ -0,0 +1,63 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Generic resource error details information. + */ +public class ErrorDetails { + /** + * the HTTP status code or error code associated with this error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * the error message localized based on Accept-Language. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * the target of the particular error (for example, the name of the + * property in error). + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * Get the HTTP status code or error code associated with this error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message localized based on Accept-Language. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the target of the particular error (for example, the name of the property in error). + * + * @return the target value + */ + public String target() { + return this.target; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/InnerError.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/InnerError.java new file mode 100644 index 0000000000000..161e53bf0b2dd --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/InnerError.java @@ -0,0 +1,47 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Generic resource inner error information. + */ +public class InnerError { + /** + * the stack trace for the error. + */ + @JsonProperty(value = "trace", access = JsonProperty.Access.WRITE_ONLY) + private String trace; + + /** + * the context for the error message. + */ + @JsonProperty(value = "context", access = JsonProperty.Access.WRITE_ONLY) + private String context; + + /** + * Get the stack trace for the error. + * + * @return the trace value + */ + public String trace() { + return this.trace; + } + + /** + * Get the context for the error message. + * + * @return the context value + */ + public String context() { + return this.context; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/OperationStatus.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/OperationStatus.java new file mode 100644 index 0000000000000..0394fdfacc79f --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/OperationStatus.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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for OperationStatus. + */ +public enum OperationStatus { + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a OperationStatus instance. */ + private String value; + + OperationStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a OperationStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed OperationStatus object, or null if unable to parse. + */ + @JsonCreator + public static OperationStatus fromString(String value) { + OperationStatus[] items = OperationStatus.values(); + for (OperationStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/SasTokenInfo.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/SasTokenInfo.java new file mode 100644 index 0000000000000..baceebd993825 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/SasTokenInfo.java @@ -0,0 +1,25 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeAnalyticsManager; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.SasTokenInfoInner; + +/** + * Type representing SasTokenInfo. + */ +public interface SasTokenInfo extends HasInner, HasManager { + /** + * @return the accessToken value. + */ + String accessToken(); + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountInfo.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountInfo.java new file mode 100644 index 0000000000000..4de0d83eb4a41 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountInfo.java @@ -0,0 +1,30 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.StorageAccountInfoInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation.DataLakeAnalyticsManager; + +/** + * Type representing StorageAccountInfo. + */ +public interface StorageAccountInfo extends HasInner, HasManager { + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + StorageAccountProperties properties(); + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountProperties.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountProperties.java new file mode 100644 index 0000000000000..62e151338121d --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/StorageAccountProperties.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.management.datalakeanalytics.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Storage account properties information. + */ +public class StorageAccountProperties { + /** + * the access key associated with this Azure Storage account that will be + * used to connect to it. + */ + @JsonProperty(value = "accessKey", required = true) + private String accessKey; + + /** + * the optional suffix for the Data Lake account. + */ + @JsonProperty(value = "suffix") + private String suffix; + + /** + * Get the access key associated with this Azure Storage account that will be used to connect to it. + * + * @return the accessKey value + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Set the access key associated with this Azure Storage account that will be used to connect to it. + * + * @param accessKey the accessKey value to set + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties withAccessKey(String accessKey) { + this.accessKey = accessKey; + return this; + } + + /** + * Get the optional suffix for the Data Lake account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the Data Lake account. + * + * @param suffix the suffix value to set + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsImpl.java new file mode 100644 index 0000000000000..afdf3bd4923d8 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsImpl.java @@ -0,0 +1,319 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.Accounts; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeAnalyticsAccount; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.AddStorageAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.AddDataLakeStoreParameters; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.StorageAccountInfo; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.BlobContainer; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.SasTokenInfo; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeStoreAccountInfo; + +class AccountsImpl extends GroupableResourcesCoreImpl implements Accounts { + protected AccountsImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().accounts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + AccountsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AccountsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccount call(DataLakeAnalyticsAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + AccountsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + AccountsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccount call(DataLakeAnalyticsAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DataLakeAnalyticsAccountImpl define(String name) { + return wrapModel(name); + } + + @Override + public Completable addStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + AccountsInner client = this.inner(); + return client.addStorageAccountAsync(resourceGroupName, accountName, storageAccountName, parameters).toCompletable(); + } + + @Override + public Completable addDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { + AccountsInner client = this.inner(); + return client.addDataLakeStoreAccountAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters).toCompletable(); + } + + @Override + protected DataLakeAnalyticsAccountImpl wrapModel(DataLakeAnalyticsAccountInner inner) { + return new DataLakeAnalyticsAccountImpl(inner.name(), inner, manager()); + } + + @Override + protected DataLakeAnalyticsAccountImpl wrapModel(String name) { + return new DataLakeAnalyticsAccountImpl(name, new DataLakeAnalyticsAccountInner(), this.manager()); + } + + private StorageAccountInfoImpl wrapStorageAccountInfoModel(StorageAccountInfoInner inner) { + return new StorageAccountInfoImpl(inner, manager()); + } + + private BlobContainerImpl wrapBlobContainerModel(BlobContainerInner inner) { + return new BlobContainerImpl(inner, manager()); + } + + private DataLakeStoreAccountInfoImpl wrapDataLakeStoreAccountInfoModel(DataLakeStoreAccountInfoInner inner) { + return new DataLakeStoreAccountInfoImpl(inner, manager()); + } + + private Observable getStorageAccountInfoInnerUsingAccountsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String accountName = IdParsingUtils.getValueFromIdByName(id, "accounts"); + String storageAccountName = IdParsingUtils.getValueFromIdByName(id, "StorageAccounts"); + AccountsInner client = this.inner(); + return client.getStorageAccountAsync(resourceGroupName, accountName, storageAccountName); + } + + private Observable getBlobContainerInnerUsingAccountsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String accountName = IdParsingUtils.getValueFromIdByName(id, "accounts"); + String storageAccountName = IdParsingUtils.getValueFromIdByName(id, "StorageAccounts"); + String containerName = IdParsingUtils.getValueFromIdByName(id, "Containers"); + AccountsInner client = this.inner(); + return client.getStorageContainerAsync(resourceGroupName, accountName, storageAccountName, containerName); + } + + private Observable getDataLakeStoreAccountInfoInnerUsingAccountsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String accountName = IdParsingUtils.getValueFromIdByName(id, "accounts"); + String dataLakeStoreAccountName = IdParsingUtils.getValueFromIdByName(id, "DataLakeStoreAccounts"); + AccountsInner client = this.inner(); + return client.getDataLakeStoreAccountAsync(resourceGroupName, accountName, dataLakeStoreAccountName); + } + + @Override + public Observable getStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName) { + AccountsInner client = this.inner(); + return client.getStorageAccountAsync(resourceGroupName, accountName, storageAccountName) + .map(new Func1() { + @Override + public StorageAccountInfo call(StorageAccountInfoInner inner) { + return wrapStorageAccountInfoModel(inner); + } + }); + } + + @Override + public Observable listStorageAccountsAsync(final String resourceGroupName, final String accountName) { + AccountsInner client = this.inner(); + return client.listStorageAccountsAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageAccountInfo call(StorageAccountInfoInner inner) { + return wrapStorageAccountInfoModel(inner); + } + }); + } + + @Override + public Completable deleteStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName) { + AccountsInner client = this.inner(); + return client.deleteStorageAccountAsync(resourceGroupName, accountName, storageAccountName).toCompletable(); + } + + @Override + public Completable updateStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + AccountsInner client = this.inner(); + return client.updateStorageAccountAsync(resourceGroupName, accountName, storageAccountName, parameters).toCompletable(); + } + + @Override + public Observable getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + AccountsInner client = this.inner(); + return client.getStorageContainerAsync(resourceGroupName, accountName, storageAccountName, containerName) + .map(new Func1() { + @Override + public BlobContainer call(BlobContainerInner inner) { + return wrapBlobContainerModel(inner); + } + }); + } + + @Override + public Observable listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + AccountsInner client = this.inner(); + return client.listStorageContainersAsync(resourceGroupName, accountName, storageAccountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BlobContainer call(BlobContainerInner inner) { + return wrapBlobContainerModel(inner); + } + }); + } + + @Override + public Observable listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + AccountsInner client = this.inner(); + return client.listSasTokensAsync(resourceGroupName, accountName, storageAccountName, containerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SasTokenInfo call(SasTokenInfoInner inner) { + return new SasTokenInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + AccountsInner client = this.inner(); + return client.getDataLakeStoreAccountAsync(resourceGroupName, accountName, dataLakeStoreAccountName) + .map(new Func1() { + @Override + public DataLakeStoreAccountInfo call(DataLakeStoreAccountInfoInner inner) { + return wrapDataLakeStoreAccountInfoModel(inner); + } + }); + } + + @Override + public Observable listDataLakeStoreAccountsAsync(final String resourceGroupName, final String accountName) { + AccountsInner client = this.inner(); + return client.listDataLakeStoreAccountsAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccountInfo call(DataLakeStoreAccountInfoInner inner) { + return wrapDataLakeStoreAccountInfoModel(inner); + } + }); + } + + @Override + public Completable deleteDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + AccountsInner client = this.inner(); + return client.deleteDataLakeStoreAccountAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toCompletable(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java new file mode 100644 index 0000000000000..f78bff62c47ce --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java @@ -0,0 +1,3597 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.AddDataLakeStoreParameters; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.AddStorageAccountParameters; +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.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 Accounts. + */ +public class AccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private AccountsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of AccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AccountsInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(AccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Accounts to be + * used by Retrofit to perform actually REST calls. + */ + interface AccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.Accounts getStorageAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}") + Observable> getStorageAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts deleteStorageAccount" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}", method = "DELETE", hasBody = true) + Observable> deleteStorageAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts updateStorageAccount" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}") + Observable> updateStorageAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("subscriptionId") String subscriptionId, @Body AddStorageAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts addStorageAccount" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}") + Observable> addStorageAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("subscriptionId") String subscriptionId, @Body AddStorageAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts getStorageContainer" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}") + Observable> getStorageContainer(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts listStorageContainers" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers") + Observable> listStorageContainers(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts listSasTokens" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens") + Observable> listSasTokens(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts getDataLakeStoreAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}") + Observable> getDataLakeStoreAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("dataLakeStoreAccountName") String dataLakeStoreAccountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts deleteDataLakeStoreAccount" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}", method = "DELETE", hasBody = true) + Observable> deleteDataLakeStoreAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("dataLakeStoreAccountName") String dataLakeStoreAccountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts addDataLakeStoreAccount" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}") + Observable> addDataLakeStoreAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("dataLakeStoreAccountName") String dataLakeStoreAccountName, @Path("subscriptionId") String subscriptionId, @Body AddDataLakeStoreParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts listStorageAccounts" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/") + Observable> listStorageAccounts(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @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("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.Accounts listDataLakeStoreAccounts" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/") + Observable> listDataLakeStoreAccounts(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @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("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.Accounts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.Accounts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts") + Observable> list(@Path("subscriptionId") String subscriptionId, @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("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.Accounts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeAnalyticsAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeAnalyticsAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeAnalyticsAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeAnalyticsAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2015_10_01_preview.Accounts listStorageContainersNext" }) + @GET + Observable> listStorageContainersNext(@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.management.datalakeanalytics.v2015_10_01_preview.Accounts listSasTokensNext" }) + @GET + Observable> listSasTokensNext(@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.management.datalakeanalytics.v2015_10_01_preview.Accounts listStorageAccountsNext" }) + @GET + Observable> listStorageAccountsNext(@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.management.datalakeanalytics.v2015_10_01_preview.Accounts listDataLakeStoreAccountsNext" }) + @GET + Observable> listDataLakeStoreAccountsNext(@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.management.datalakeanalytics.v2015_10_01_preview.Accounts listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@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.management.datalakeanalytics.v2015_10_01_preview.Accounts listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve Azure storage account details. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @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 StorageAccountInfoInner object if successful. + */ + public StorageAccountInfoInner getStorageAccount(String resourceGroupName, String accountName, String storageAccountName) { + return getStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single().body(); + } + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve Azure storage account details. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @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 getStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName), serviceCallback); + } + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve Azure storage account details. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInfoInner object + */ + public Observable getStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName) { + return getStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).map(new Func1, StorageAccountInfoInner>() { + @Override + public StorageAccountInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve Azure storage account details. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInfoInner object + */ + public Observable> getStorageAccountWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getStorageAccount(resourceGroupName, accountName, storageAccountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getStorageAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getStorageAccountDelegate(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); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to remove + * @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 deleteStorageAccount(String resourceGroupName, String accountName, String storageAccountName) { + deleteStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to remove + * @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 deleteStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName), serviceCallback); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName) { + return deleteStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteStorageAccountWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteStorageAccount(resourceGroupName, accountName, storageAccountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteStorageAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteStorageAccountDelegate(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); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to modify storage accounts in + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with. + * @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 updateStorageAccount(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + updateStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to modify storage accounts in + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with. + * @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 updateStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to modify storage accounts in + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable updateStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + return updateStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to modify storage accounts in + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> updateStorageAccountWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.updateStorageAccount(resourceGroupName, accountName, storageAccountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateStorageAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateStorageAccountDelegate(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); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @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 addStorageAccount(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + addStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @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 addStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + return addStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Azure Storage account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> addStorageAccountWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.addStorageAccount(resourceGroupName, accountName, storageAccountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addStorageAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addStorageAccountDelegate(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 Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to retrieve blob container. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container 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 BlobContainerInner object if successful. + */ + public BlobContainerInner getStorageContainer(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + return getStorageContainerWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName).toBlocking().single().body(); + } + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to retrieve blob container. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container 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 getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getStorageContainerWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName), serviceCallback); + } + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to retrieve blob container. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + return getStorageContainerWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName).map(new Func1, BlobContainerInner>() { + @Override + public BlobContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to retrieve blob container. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BlobContainerInner object + */ + public Observable> getStorageContainerWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (containerName == null) { + throw new IllegalArgumentException("Parameter containerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getStorageContainerDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getStorageContainerDelegate(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 Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage blob containers. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @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<BlobContainerInner> object if successful. + */ + public PagedList listStorageContainers(final String resourceGroupName, final String accountName, final String storageAccountName) { + ServiceResponse> response = listStorageContainersSinglePageAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage blob containers. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @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> listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStorageContainersSinglePageAsync(resourceGroupName, accountName, storageAccountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage blob containers. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BlobContainerInner> object + */ + public Observable> listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + return listStorageContainersWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage blob containers. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BlobContainerInner> object + */ + public Observable>> listStorageContainersWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + return listStorageContainersSinglePageAsync(resourceGroupName, accountName, storageAccountName) + .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(listStorageContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage blob containers. + ServiceResponse> * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BlobContainerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStorageContainersSinglePageAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStorageContainers(resourceGroupName, accountName, storageAccountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStorageContainersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStorageContainersDelegate(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 SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which an Azure Storage account's SAS token is being requested. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @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<SasTokenInfoInner> object if successful. + */ + public PagedList listSasTokens(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + ServiceResponse> response = listSasTokensSinglePageAsync(resourceGroupName, accountName, storageAccountName, containerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which an Azure Storage account's SAS token is being requested. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @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> listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSasTokensSinglePageAsync(resourceGroupName, accountName, storageAccountName, containerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which an Azure Storage account's SAS token is being requested. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SasTokenInfoInner> object + */ + public Observable> listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + return listSasTokensWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which an Azure Storage account's SAS token is being requested. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SasTokenInfoInner> object + */ + public Observable>> listSasTokensWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + return listSasTokensSinglePageAsync(resourceGroupName, accountName, storageAccountName, containerName) + .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(listSasTokensNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account from which an Azure Storage account's SAS token is being requested. + ServiceResponse> * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + ServiceResponse> * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SasTokenInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSasTokensSinglePageAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (containerName == null) { + throw new IllegalArgumentException("Parameter containerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSasTokens(resourceGroupName, accountName, storageAccountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSasTokensDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSasTokensDelegate(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 specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve the Data Lake Store account details. + * @param dataLakeStoreAccountName The name of the Data Lake Store account 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 DataLakeStoreAccountInfoInner object if successful. + */ + public DataLakeStoreAccountInfoInner getDataLakeStoreAccount(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + return getDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve the Data Lake Store account details. + * @param dataLakeStoreAccountName The name of the Data Lake Store account 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 getDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve the Data Lake Store account details. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInfoInner object + */ + public Observable getDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + return getDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).map(new Func1, DataLakeStoreAccountInfoInner>() { + @Override + public DataLakeStoreAccountInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to retrieve the Data Lake Store account details. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInfoInner object + */ + public Observable> getDataLakeStoreAccountWithServiceResponseAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (dataLakeStoreAccountName == null) { + throw new IllegalArgumentException("Parameter dataLakeStoreAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDataLakeStoreAccount(resourceGroupName, accountName, dataLakeStoreAccountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDataLakeStoreAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDataLakeStoreAccountDelegate(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); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @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 deleteDataLakeStoreAccount(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + deleteDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @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 deleteDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + return deleteDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account from which to remove the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteDataLakeStoreAccountWithServiceResponseAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (dataLakeStoreAccountName == null) { + throw new IllegalArgumentException("Parameter dataLakeStoreAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteDataLakeStoreAccount(resourceGroupName, accountName, dataLakeStoreAccountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDataLakeStoreAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDataLakeStoreAccountDelegate(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); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @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 addDataLakeStoreAccount(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { + addDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @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 addDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { + return addDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to which to add the Data Lake Store account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> addDataLakeStoreAccountWithServiceResponseAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (dataLakeStoreAccountName == null) { + throw new IllegalArgumentException("Parameter dataLakeStoreAccountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.addDataLakeStoreAccount(resourceGroupName, accountName, dataLakeStoreAccountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDataLakeStoreAccountDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDataLakeStoreAccountDelegate(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 first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @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<StorageAccountInfoInner> object if successful. + */ + public PagedList listStorageAccounts(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listStorageAccountsSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStorageAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @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> listStorageAccountsAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStorageAccountsSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStorageAccountsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInfoInner> object + */ + public Observable> listStorageAccountsAsync(final String resourceGroupName, final String accountName) { + return listStorageAccountsWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInfoInner> object + */ + public Observable>> listStorageAccountsWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listStorageAccountsSinglePageAsync(resourceGroupName, 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(listStorageAccountsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageAccountInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStorageAccountsSinglePageAsync(final String resourceGroupName, final String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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; + return service.listStorageAccounts(resourceGroupName, accountName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStorageAccountsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @param filter The 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 desired 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<StorageAccountInfoInner> object if successful. + */ + public PagedList listStorageAccounts(final String resourceGroupName, 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 = listStorageAccountsSinglePageAsync(resourceGroupName, accountName, filter, top, skip, expand, select, orderby, count, search, format).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStorageAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @param filter The 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 desired 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> listStorageAccountsAsync(final String resourceGroupName, 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( + listStorageAccountsSinglePageAsync(resourceGroupName, accountName, filter, top, skip, expand, select, orderby, count, search, format), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStorageAccountsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @param filter The 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 desired 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<StorageAccountInfoInner> object + */ + public Observable> listStorageAccountsAsync(final String resourceGroupName, 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 listStorageAccountsWithServiceResponseAsync(resourceGroupName, accountName, filter, top, skip, expand, select, orderby, count, search, format) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + * @param filter The 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 desired 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<StorageAccountInfoInner> object + */ + public Observable>> listStorageAccountsWithServiceResponseAsync(final String resourceGroupName, 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 listStorageAccountsSinglePageAsync(resourceGroupName, 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(listStorageAccountsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account for which to list Azure Storage accounts. + ServiceResponse> * @param filter The 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 desired 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<StorageAccountInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStorageAccountsSinglePageAsync(final String resourceGroupName, 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 (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStorageAccounts(resourceGroupName, accountName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStorageAccountsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStorageAccountsDelegate(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 first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @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<DataLakeStoreAccountInfoInner> object if successful. + */ + public PagedList listDataLakeStoreAccounts(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listDataLakeStoreAccountsSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @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> listDataLakeStoreAccountsAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDataLakeStoreAccountsSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInfoInner> object + */ + public Observable> listDataLakeStoreAccountsAsync(final String resourceGroupName, final String accountName) { + return listDataLakeStoreAccountsWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInfoInner> object + */ + public Observable>> listDataLakeStoreAccountsWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listDataLakeStoreAccountsSinglePageAsync(resourceGroupName, 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(listDataLakeStoreAccountsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeStoreAccountInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDataLakeStoreAccountsSinglePageAsync(final String resourceGroupName, final String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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; + return service.listDataLakeStoreAccounts(resourceGroupName, accountName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDataLakeStoreAccountsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @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 desired 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<DataLakeStoreAccountInfoInner> object if successful. + */ + public PagedList listDataLakeStoreAccounts(final String resourceGroupName, 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 = listDataLakeStoreAccountsSinglePageAsync(resourceGroupName, accountName, filter, top, skip, expand, select, orderby, count, search, format).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @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 desired 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> listDataLakeStoreAccountsAsync(final String resourceGroupName, 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( + listDataLakeStoreAccountsSinglePageAsync(resourceGroupName, accountName, filter, top, skip, expand, select, orderby, count, search, format), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @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 desired 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<DataLakeStoreAccountInfoInner> object + */ + public Observable> listDataLakeStoreAccountsAsync(final String resourceGroupName, 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 listDataLakeStoreAccountsWithServiceResponseAsync(resourceGroupName, accountName, filter, top, skip, expand, select, orderby, count, search, format) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + * @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 desired 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<DataLakeStoreAccountInfoInner> object + */ + public Observable>> listDataLakeStoreAccountsWithServiceResponseAsync(final String resourceGroupName, 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 listDataLakeStoreAccountsSinglePageAsync(resourceGroupName, 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(listDataLakeStoreAccountsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account for which to list Data Lake Store accounts. + 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 desired 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<DataLakeStoreAccountInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDataLakeStoreAccountsSinglePageAsync(final String resourceGroupName, 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 (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDataLakeStoreAccounts(resourceGroupName, accountName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDataLakeStoreAccountsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDataLakeStoreAccountsDelegate(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 first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @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<DataLakeAnalyticsAccountInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeAnalyticsAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @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<DataLakeAnalyticsAccountInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, 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 = listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, expand, select, orderby, count, search, format).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @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> listByResourceGroupAsync(final String resourceGroupName, 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( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, expand, select, orderby, count, search, format), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @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<DataLakeAnalyticsAccountInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, 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 listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, top, skip, expand, select, orderby, count, search, format) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @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<DataLakeAnalyticsAccountInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, 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 listByResourceGroupSinglePageAsync(resourceGroupName, 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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + 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<DataLakeAnalyticsAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, 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 (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(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 first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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<DataLakeAnalyticsAccountInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeAnalyticsAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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; + return service.list(this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 desired 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<DataLakeAnalyticsAccountInner> object if successful. + */ + public PagedList list(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(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(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 desired 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 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(filter, top, skip, expand, select, orderby, count, search, format), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 desired 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<DataLakeAnalyticsAccountInner> object + */ + public Observable> listAsync(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(filter, top, skip, expand, select, orderby, count, search, format) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 desired 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<DataLakeAnalyticsAccountInner> object + */ + public Observable>> listWithServiceResponseAsync(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(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)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + 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 desired 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<DataLakeAnalyticsAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), 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 details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account 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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account 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 getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(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); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account 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 delete(String resourceGroupName, String accountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account 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 deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account 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 beginDelete(String resourceGroupName, String accountName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account 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 beginDeleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Begins the delete delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param accountName The name of the Data Lake Analytics account to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account 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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner create(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account operation. + * @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 resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + Observable> observable = service.create(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account 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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner beginCreate(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account operation. + * @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 beginCreateAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.the account will be associated with. + * @param name The name of the Data Lake Analytics account to create. + * @param parameters Parameters supplied to the create Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.beginCreate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account 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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner update(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @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 updateAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + Observable> observable = service.update(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account 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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner beginUpdate(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @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 beginUpdateAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. + * @param name The name of the Data Lake Analytics account to update. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String name, DataLakeAnalyticsAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.beginUpdate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<BlobContainerInner> object if successful. + */ + public PagedList listStorageContainersNext(final String nextPageLink) { + ServiceResponse> response = listStorageContainersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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> listStorageContainersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStorageContainersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<BlobContainerInner> object + */ + public Observable> listStorageContainersNextAsync(final String nextPageLink) { + return listStorageContainersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<BlobContainerInner> object + */ + public Observable>> listStorageContainersNextWithServiceResponseAsync(final String nextPageLink) { + return listStorageContainersNextSinglePageAsync(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(listStorageContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<BlobContainerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStorageContainersNextSinglePageAsync(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.listStorageContainersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStorageContainersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStorageContainersNextDelegate(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 SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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<SasTokenInfoInner> object if successful. + */ + public PagedList listSasTokensNext(final String nextPageLink) { + ServiceResponse> response = listSasTokensNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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> listSasTokensNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSasTokensNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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<SasTokenInfoInner> object + */ + public Observable> listSasTokensNextAsync(final String nextPageLink) { + return listSasTokensNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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<SasTokenInfoInner> object + */ + public Observable>> listSasTokensNextWithServiceResponseAsync(final String nextPageLink) { + return listSasTokensNextSinglePageAsync(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(listSasTokensNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SasTokenInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSasTokensNextSinglePageAsync(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.listSasTokensNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSasTokensNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSasTokensNextDelegate(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 first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInfoInner> object if successful. + */ + public PagedList listStorageAccountsNext(final String nextPageLink) { + ServiceResponse> response = listStorageAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStorageAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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> listStorageAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStorageAccountsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStorageAccountsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInfoInner> object + */ + public Observable> listStorageAccountsNextAsync(final String nextPageLink) { + return listStorageAccountsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInfoInner> object + */ + public Observable>> listStorageAccountsNextWithServiceResponseAsync(final String nextPageLink) { + return listStorageAccountsNextSinglePageAsync(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(listStorageAccountsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStorageAccountsNextSinglePageAsync(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.listStorageAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStorageAccountsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStorageAccountsNextDelegate(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 first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInfoInner> object if successful. + */ + public PagedList listDataLakeStoreAccountsNext(final String nextPageLink) { + ServiceResponse> response = listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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> listDataLakeStoreAccountsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDataLakeStoreAccountsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInfoInner> object + */ + public Observable> listDataLakeStoreAccountsNextAsync(final String nextPageLink) { + return listDataLakeStoreAccountsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInfoInner> object + */ + public Observable>> listDataLakeStoreAccountsNextWithServiceResponseAsync(final String nextPageLink) { + return listDataLakeStoreAccountsNextSinglePageAsync(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(listDataLakeStoreAccountsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDataLakeStoreAccountsNextSinglePageAsync(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.listDataLakeStoreAccountsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDataLakeStoreAccountsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDataLakeStoreAccountsNextDelegate(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 first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(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 first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> 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(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> 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)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountInner> 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/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerImpl.java new file mode 100644 index 0000000000000..ca1c99901b129 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerImpl.java @@ -0,0 +1,66 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.BlobContainer; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.BlobContainerProperties; + +class BlobContainerImpl extends IndexableRefreshableWrapperImpl implements BlobContainer { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String storageAccountName; + private String containerName; + + BlobContainerImpl(BlobContainerInner inner, DataLakeAnalyticsManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.storageAccountName = IdParsingUtils.getValueFromIdByName(inner.id(), "StorageAccounts"); + this.containerName = IdParsingUtils.getValueFromIdByName(inner.id(), "Containers"); + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.getStorageContainerAsync(this.resourceGroupName, this.accountName, this.storageAccountName, this.containerName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public BlobContainerProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerInner.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerInner.java new file mode 100644 index 0000000000000..d6c6bdcd6d05c --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/BlobContainerInner.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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.BlobContainerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Storage blob container information. + */ +public class BlobContainerInner { + /** + * the name of the blob container. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * the unique identifier of the blob container. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * the type of the blob container. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * the properties of the blob container. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private BlobContainerProperties properties; + + /** + * Get the name of the blob container. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the unique identifier of the blob container. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the type of the blob container. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the properties of the blob container. + * + * @return the properties value + */ + public BlobContainerProperties properties() { + return this.properties; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountImpl.java new file mode 100644 index 0000000000000..53f4145286932 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountImpl.java @@ -0,0 +1,58 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeAnalyticsAccount; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeAnalyticsAccountProperties; + +class DataLakeAnalyticsAccountImpl extends GroupableResourceCoreImpl implements DataLakeAnalyticsAccount, DataLakeAnalyticsAccount.Definition, DataLakeAnalyticsAccount.Update { + DataLakeAnalyticsAccountImpl(String name, DataLakeAnalyticsAccountInner inner, DataLakeAnalyticsManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.createAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DataLakeAnalyticsAccountProperties properties() { + return this.inner().properties(); + } + + @Override + public DataLakeAnalyticsAccountImpl withProperties(DataLakeAnalyticsAccountProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountInner.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountInner.java new file mode 100644 index 0000000000000..bf44168927823 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountInner.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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import java.util.Map; + +import com.microsoft.azure.Resource; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeAnalyticsAccountProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Data Lake Analytics account object, containing all information associated + * with the named Data Lake Analytics account. + */ +public class DataLakeAnalyticsAccountInner extends Resource { + /** + * the properties defined by Data Lake Analytics all properties are + * specific to each resource provider. + */ + @JsonProperty(value = "properties") + private DataLakeAnalyticsAccountProperties properties; + + /** + * Get the properties defined by Data Lake Analytics all properties are specific to each resource provider. + * + * @return the properties value + */ + public DataLakeAnalyticsAccountProperties properties() { + return this.properties; + } + + /** + * Set the properties defined by Data Lake Analytics all properties are specific to each resource provider. + * + * @param properties the properties value to set + * @return the DataLakeAnalyticsAccountInner object itself. + */ + public DataLakeAnalyticsAccountInner withProperties(DataLakeAnalyticsAccountProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountManagementClientImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountManagementClientImpl.java new file mode 100644 index 0000000000000..ff1245625dd55 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsAccountManagementClientImpl.java @@ -0,0 +1,196 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataLakeAnalyticsAccountManagementClientImpl class. + */ +public class DataLakeAnalyticsAccountManagementClientImpl extends AzureServiceClient { + /** 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; + } + + /** Get subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Get subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Get subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataLakeAnalyticsAccountManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataLakeAnalyticsAccountManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * 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 DataLakeAnalyticsAccountManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 DataLakeAnalyticsAccountManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The AccountsInner object to access its operations. + */ + private AccountsInner accounts; + + /** + * Gets the AccountsInner object to access its operations. + * @return the AccountsInner object. + */ + public AccountsInner accounts() { + return this.accounts; + } + + /** + * Initializes an instance of DataLakeAnalyticsAccountManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public DataLakeAnalyticsAccountManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataLakeAnalyticsAccountManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataLakeAnalyticsAccountManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataLakeAnalyticsAccountManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataLakeAnalyticsAccountManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2015-10-01-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.accounts = new AccountsInner(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, auto-generated)", super.userAgent(), "DataLakeAnalyticsAccountManagementClient", "2015-10-01-preview"); + } +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsManager.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsManager.java new file mode 100644 index 0000000000000..c0150fa7d6581 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeAnalyticsManager.java @@ -0,0 +1,99 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.Accounts; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataLakeAnalytics resource management. + */ +public final class DataLakeAnalyticsManager extends ManagerCore { + private Accounts accounts; + /** + * Get a Configurable instance that can be used to create DataLakeAnalyticsManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataLakeAnalyticsManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataLakeAnalyticsManager that exposes DataLakeAnalytics resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataLakeAnalyticsManager + */ + public static DataLakeAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataLakeAnalyticsManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataLakeAnalyticsManager that exposes DataLakeAnalytics resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataLakeAnalyticsManager + */ + public static DataLakeAnalyticsManager authenticate(RestClient restClient, String subscriptionId) { + return new DataLakeAnalyticsManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataLakeAnalyticsManager that exposes DataLakeAnalytics management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataLakeAnalytics management API entry points that work across subscriptions + */ + DataLakeAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Accounts. + */ + public Accounts accounts() { + if (this.accounts == null) { + this.accounts = new AccountsImpl(this); + } + return this.accounts; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataLakeAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataLakeAnalyticsManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataLakeAnalyticsManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataLakeAnalyticsAccountManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoImpl.java new file mode 100644 index 0000000000000..e5129293168fc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoImpl.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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeStoreAccountInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeStoreAccountInfoProperties; + +class DataLakeStoreAccountInfoImpl extends WrapperImpl implements DataLakeStoreAccountInfo { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String dataLakeStoreAccountName; + + DataLakeStoreAccountInfoImpl(DataLakeStoreAccountInfoInner inner, DataLakeAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DataLakeStoreAccountInfoProperties properties() { + return this.inner().properties(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoInner.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoInner.java new file mode 100644 index 0000000000000..9ca1f9197200b --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/DataLakeStoreAccountInfoInner.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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.DataLakeStoreAccountInfoProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store account information. + */ +public class DataLakeStoreAccountInfoInner { + /** + * the account name of the Data Lake Store account. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * the properties associated with this Data Lake Store account. + */ + @JsonProperty(value = "properties") + private DataLakeStoreAccountInfoProperties properties; + + /** + * Get the account name of the Data Lake Store account. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the account name of the Data Lake Store account. + * + * @param name the name value to set + * @return the DataLakeStoreAccountInfoInner object itself. + */ + public DataLakeStoreAccountInfoInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties associated with this Data Lake Store account. + * + * @return the properties value + */ + public DataLakeStoreAccountInfoProperties properties() { + return this.properties; + } + + /** + * Set the properties associated with this Data Lake Store account. + * + * @param properties the properties value to set + * @return the DataLakeStoreAccountInfoInner object itself. + */ + public DataLakeStoreAccountInfoInner withProperties(DataLakeStoreAccountInfoProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/IdParsingUtils.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..2bd77d1f9a1cf --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/PageImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/PageImpl.java new file mode 100644 index 0000000000000..56586700bcace --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +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/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoImpl.java new file mode 100644 index 0000000000000..6b92c11bf074c --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoImpl.java @@ -0,0 +1,31 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.SasTokenInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SasTokenInfoImpl extends WrapperImpl implements SasTokenInfo { + private final DataLakeAnalyticsManager manager; + SasTokenInfoImpl(SasTokenInfoInner inner, DataLakeAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public String accessToken() { + return this.inner().accessToken(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoInner.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoInner.java new file mode 100644 index 0000000000000..3960a21d26a1e --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/SasTokenInfoInner.java @@ -0,0 +1,32 @@ +/** + * 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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SAS token information. + */ +public class SasTokenInfoInner { + /** + * the access token for the associated Azure Storage Container. + */ + @JsonProperty(value = "accessToken", access = JsonProperty.Access.WRITE_ONLY) + private String accessToken; + + /** + * Get the access token for the associated Azure Storage Container. + * + * @return the accessToken value + */ + public String accessToken() { + return this.accessToken; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoImpl.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoImpl.java new file mode 100644 index 0000000000000..7abe62b4cb4bb --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoImpl.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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.StorageAccountInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.StorageAccountProperties; + +class StorageAccountInfoImpl extends WrapperImpl implements StorageAccountInfo { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String storageAccountName; + + StorageAccountInfoImpl(StorageAccountInfoInner inner, DataLakeAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public StorageAccountProperties properties() { + return this.inner().properties(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoInner.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoInner.java new file mode 100644 index 0000000000000..b48004235a803 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/StorageAccountInfoInner.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.management.datalakeanalytics.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.StorageAccountProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Storage account information. + */ +public class StorageAccountInfoInner { + /** + * the account name associated with the Azure storage account. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * the properties associated with this storage account. + */ + @JsonProperty(value = "properties", required = true) + private StorageAccountProperties properties; + + /** + * Get the account name associated with the Azure storage account. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the account name associated with the Azure storage account. + * + * @param name the name value to set + * @return the StorageAccountInfoInner object itself. + */ + public StorageAccountInfoInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties associated with this storage account. + * + * @return the properties value + */ + public StorageAccountProperties properties() { + return this.properties; + } + + /** + * Set the properties associated with this storage account. + * + * @param properties the properties value to set + * @return the StorageAccountInfoInner object itself. + */ + public StorageAccountInfoInner withProperties(StorageAccountProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/package-info.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/package-info.java new file mode 100644 index 0000000000000..247a4ee3c8499 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/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 DataLakeAnalyticsAccountManagementClient. + * Creates an Azure Data Lake Analytics account management client. + */ +package com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview.implementation; diff --git a/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/package-info.java b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/package-info.java new file mode 100644 index 0000000000000..5818ff73fae14 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/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 DataLakeAnalyticsAccountManagementClient. + * Creates an Azure Data Lake Analytics account management client. + */ +package com.microsoft.azure.management.datalakeanalytics.v2015_10_01_preview; diff --git a/datalakeanalytics/resource-manager/v2016_11_01/pom.xml b/datalakeanalytics/resource-manager/v2016_11_01/pom.xml new file mode 100644 index 0000000000000..63244e88e6e58 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.datalakeanalytics.v2016_11_01 + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-datalakeanalytics + 1.0.0-beta-2 + jar + Microsoft Azure SDK for DataLakeAnalytics Management + This package contains Microsoft DataLakeAnalytics Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AADObjectType.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AADObjectType.java new file mode 100644 index 0000000000000..657f141e77a33 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AADObjectType.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.management.datalakeanalytics.v2016_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AADObjectType. + */ +public final class AADObjectType extends ExpandableStringEnum { + /** Static value User for AADObjectType. */ + public static final AADObjectType USER = fromString("User"); + + /** Static value Group for AADObjectType. */ + public static final AADObjectType GROUP = fromString("Group"); + + /** Static value ServicePrincipal for AADObjectType. */ + public static final AADObjectType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); + + /** + * Creates or finds a AADObjectType from its string representation. + * @param name a name to look for + * @return the corresponding AADObjectType + */ + @JsonCreator + public static AADObjectType fromString(String name) { + return fromString(name, AADObjectType.class); + } + + /** + * @return known AADObjectType values + */ + public static Collection values() { + return values(AADObjectType.class); + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Accounts.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Accounts.java new file mode 100644 index 0000000000000..ef81271a05aac --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Accounts.java @@ -0,0 +1,35 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.AccountsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Accounts. + */ +public interface Accounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Analytics account name availability. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreParameters.java new file mode 100644 index 0000000000000..4bad32ce4824a --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreParameters.java @@ -0,0 +1,45 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to add a new Data Lake Store account. + */ +@JsonFlatten +public class AddDataLakeStoreParameters { + /** + * The optional suffix for the Data Lake Store account. + */ + @JsonProperty(value = "properties.suffix") + private String suffix; + + /** + * Get the optional suffix for the Data Lake Store account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the Data Lake Store account. + * + * @param suffix the suffix value to set + * @return the AddDataLakeStoreParameters object itself. + */ + public AddDataLakeStoreParameters withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreWithAccountParameters.java new file mode 100644 index 0000000000000..5b511eee7a096 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddDataLakeStoreWithAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to add a new Data Lake Store account while creating a + * new Data Lake Analytics account. + */ +@JsonFlatten +public class AddDataLakeStoreWithAccountParameters { + /** + * The unique name of the Data Lake Store account to add. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The optional suffix for the Data Lake Store account. + */ + @JsonProperty(value = "properties.suffix") + private String suffix; + + /** + * Get the unique name of the Data Lake Store account to add. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the Data Lake Store account to add. + * + * @param name the name value to set + * @return the AddDataLakeStoreWithAccountParameters object itself. + */ + public AddDataLakeStoreWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the optional suffix for the Data Lake Store account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the Data Lake Store account. + * + * @param suffix the suffix value to set + * @return the AddDataLakeStoreWithAccountParameters object itself. + */ + public AddDataLakeStoreWithAccountParameters withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountParameters.java new file mode 100644 index 0000000000000..f4dac48312c00 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to add a new Azure Storage account. + */ +@JsonFlatten +public class AddStorageAccountParameters { + /** + * The access key associated with this Azure Storage account that will be + * used to connect to it. + */ + @JsonProperty(value = "properties.accessKey", required = true) + private String accessKey; + + /** + * The optional suffix for the storage account. + */ + @JsonProperty(value = "properties.suffix") + private String suffix; + + /** + * Get the access key associated with this Azure Storage account that will be used to connect to it. + * + * @return the accessKey value + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Set the access key associated with this Azure Storage account that will be used to connect to it. + * + * @param accessKey the accessKey value to set + * @return the AddStorageAccountParameters object itself. + */ + public AddStorageAccountParameters withAccessKey(String accessKey) { + this.accessKey = accessKey; + return this; + } + + /** + * Get the optional suffix for the storage account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the storage account. + * + * @param suffix the suffix value to set + * @return the AddStorageAccountParameters object itself. + */ + public AddStorageAccountParameters withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountWithAccountParameters.java new file mode 100644 index 0000000000000..40d58677457cf --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/AddStorageAccountWithAccountParameters.java @@ -0,0 +1,99 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to add a new Azure Storage account while creating a new + * Data Lake Analytics account. + */ +@JsonFlatten +public class AddStorageAccountWithAccountParameters { + /** + * The unique name of the Azure Storage account to add. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The access key associated with this Azure Storage account that will be + * used to connect to it. + */ + @JsonProperty(value = "properties.accessKey", required = true) + private String accessKey; + + /** + * The optional suffix for the storage account. + */ + @JsonProperty(value = "properties.suffix") + private String suffix; + + /** + * Get the unique name of the Azure Storage account to add. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the Azure Storage account to add. + * + * @param name the name value to set + * @return the AddStorageAccountWithAccountParameters object itself. + */ + public AddStorageAccountWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the access key associated with this Azure Storage account that will be used to connect to it. + * + * @return the accessKey value + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Set the access key associated with this Azure Storage account that will be used to connect to it. + * + * @param accessKey the accessKey value to set + * @return the AddStorageAccountWithAccountParameters object itself. + */ + public AddStorageAccountWithAccountParameters withAccessKey(String accessKey) { + this.accessKey = accessKey; + return this; + } + + /** + * Get the optional suffix for the storage account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the storage account. + * + * @param suffix the suffix value to set + * @return the AddStorageAccountWithAccountParameters object itself. + */ + public AddStorageAccountWithAccountParameters withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CapabilityInformation.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CapabilityInformation.java new file mode 100644 index 0000000000000..34cc0c3dc4da3 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CapabilityInformation.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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.CapabilityInformationInner; +import java.util.UUID; + +/** + * Type representing CapabilityInformation. + */ +public interface CapabilityInformation extends HasInner, HasManager { + /** + * @return the accountCount value. + */ + Integer accountCount(); + + /** + * @return the maxAccountCount value. + */ + Integer maxAccountCount(); + + /** + * @return the migrationState value. + */ + Boolean migrationState(); + + /** + * @return the state value. + */ + SubscriptionState state(); + + /** + * @return the subscriptionId value. + */ + UUID subscriptionId(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CheckNameAvailabilityParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CheckNameAvailabilityParameters.java new file mode 100644 index 0000000000000..3f6224547ef4f --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CheckNameAvailabilityParameters.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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Analytics account name availability check parameters. + */ +public class CheckNameAvailabilityParameters { + /** + * The Data Lake Analytics name to check availability for. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The resource type. Note: This should not be set by the user, as the + * constant value is Microsoft.DataLakeAnalytics/accounts. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of CheckNameAvailabilityParameters class. + * @param name the Data Lake Analytics name to check availability for. + */ + public CheckNameAvailabilityParameters() { + type = "Microsoft.DataLakeAnalytics/accounts"; + } + + /** + * Get the Data Lake Analytics name to check availability for. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the Data Lake Analytics name to check availability for. + * + * @param name the name value to set + * @return the CheckNameAvailabilityParameters object itself. + */ + public CheckNameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeAnalytics/accounts. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeAnalytics/accounts. + * + * @param type the type value to set + * @return the CheckNameAvailabilityParameters object itself. + */ + public CheckNameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicies.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicies.java new file mode 100644 index 0000000000000..819dafa5ada86 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicies.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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.ComputePoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ComputePolicies. + */ +public interface ComputePolicies extends SupportsCreating, HasInner { + /** + * Gets the specified Data Lake Analytics compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String computePolicyName); + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified compute policy from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String computePolicyName); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicy.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicy.java new file mode 100644 index 0000000000000..d9d6b0c381051 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/ComputePolicy.java @@ -0,0 +1,205 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.ComputePolicyInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; +import java.util.UUID; + +/** + * Type representing ComputePolicy. + */ +public interface ComputePolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the maxDegreeOfParallelismPerJob value. + */ + Integer maxDegreeOfParallelismPerJob(); + + /** + * @return the minPriorityPerJob value. + */ + Integer minPriorityPerJob(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the objectId value. + */ + UUID objectId(); + + /** + * @return the objectType value. + */ + AADObjectType objectType(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ComputePolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAccount, DefinitionStages.WithObjectId, DefinitionStages.WithObjectType, DefinitionStages.WithCreate { + } + + /** + * Grouping of ComputePolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ComputePolicy definition. + */ + interface Blank extends WithAccount { + } + + /** + * The stage of the computepolicy definition allowing to specify Account. + */ + interface WithAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the Azure resource group + * @param accountName The name of the Data Lake Analytics account + * @return the next definition stage + */ + WithObjectId withExistingAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the computepolicy definition allowing to specify ObjectId. + */ + interface WithObjectId { + /** + * Specifies objectId. + * @param objectId The AAD object identifier for the entity to create a policy for + * @return the next definition stage + */ + WithObjectType withObjectId(UUID objectId); + } + + /** + * The stage of the computepolicy definition allowing to specify ObjectType. + */ + interface WithObjectType { + /** + * Specifies objectType. + * @param objectType The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @return the next definition stage + */ + WithCreate withObjectType(AADObjectType objectType); + } + + /** + * The stage of the computepolicy definition allowing to specify MaxDegreeOfParallelismPerJob. + */ + interface WithMaxDegreeOfParallelismPerJob { + /** + * Specifies maxDegreeOfParallelismPerJob. + * @param maxDegreeOfParallelismPerJob The maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed + * @return the next definition stage + */ + WithCreate withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob); + } + + /** + * The stage of the computepolicy definition allowing to specify MinPriorityPerJob. + */ + interface WithMinPriorityPerJob { + /** + * Specifies minPriorityPerJob. + * @param minPriorityPerJob The minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed + * @return the next definition stage + */ + WithCreate withMinPriorityPerJob(Integer minPriorityPerJob); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithMaxDegreeOfParallelismPerJob, DefinitionStages.WithMinPriorityPerJob { + } + } + /** + * The template for a ComputePolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithMaxDegreeOfParallelismPerJob, UpdateStages.WithMinPriorityPerJob, UpdateStages.WithObjectId, UpdateStages.WithObjectType { + } + + /** + * Grouping of ComputePolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the computepolicy update allowing to specify MaxDegreeOfParallelismPerJob. + */ + interface WithMaxDegreeOfParallelismPerJob { + /** + * Specifies maxDegreeOfParallelismPerJob. + * @param maxDegreeOfParallelismPerJob The maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed + * @return the next update stage + */ + Update withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob); + } + + /** + * The stage of the computepolicy update allowing to specify MinPriorityPerJob. + */ + interface WithMinPriorityPerJob { + /** + * Specifies minPriorityPerJob. + * @param minPriorityPerJob The minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed + * @return the next update stage + */ + Update withMinPriorityPerJob(Integer minPriorityPerJob); + } + + /** + * The stage of the computepolicy update allowing to specify ObjectId. + */ + interface WithObjectId { + /** + * Specifies objectId. + * @param objectId The AAD object identifier for the entity to create a policy for + * @return the next update stage + */ + Update withObjectId(UUID objectId); + } + + /** + * The stage of the computepolicy update allowing to specify ObjectType. + */ + interface WithObjectType { + /** + * Specifies objectType. + * @param objectType The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @return the next update stage + */ + Update withObjectType(AADObjectType objectType); + } + + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateComputePolicyWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateComputePolicyWithAccountParameters.java new file mode 100644 index 0000000000000..76948da49f164 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateComputePolicyWithAccountParameters.java @@ -0,0 +1,156 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new compute policy while creating a new Data + * Lake Analytics account. + */ +@JsonFlatten +public class CreateComputePolicyWithAccountParameters { + /** + * The unique name of the compute policy to create. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The AAD object identifier for the entity to create a policy for. + */ + @JsonProperty(value = "properties.objectId", required = true) + private UUID objectId; + + /** + * The type of AAD object the object identifier refers to. Possible values + * include: 'User', 'Group', 'ServicePrincipal'. + */ + @JsonProperty(value = "properties.objectType", required = true) + private AADObjectType objectType; + + /** + * The maximum degree of parallelism per job this user can use to submit + * jobs. This property, the min priority per job property, or both must be + * passed. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob") + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum priority per job this user can use to submit jobs. This + * property, the max degree of parallelism per job property, or both must + * be passed. + */ + @JsonProperty(value = "properties.minPriorityPerJob") + private Integer minPriorityPerJob; + + /** + * Get the unique name of the compute policy to create. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the compute policy to create. + * + * @param name the name value to set + * @return the CreateComputePolicyWithAccountParameters object itself. + */ + public CreateComputePolicyWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the AAD object identifier for the entity to create a policy for. + * + * @return the objectId value + */ + public UUID objectId() { + return this.objectId; + } + + /** + * Set the AAD object identifier for the entity to create a policy for. + * + * @param objectId the objectId value to set + * @return the CreateComputePolicyWithAccountParameters object itself. + */ + public CreateComputePolicyWithAccountParameters withObjectId(UUID objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @return the objectType value + */ + public AADObjectType objectType() { + return this.objectType; + } + + /** + * Set the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @param objectType the objectType value to set + * @return the CreateComputePolicyWithAccountParameters object itself. + */ + public CreateComputePolicyWithAccountParameters withObjectType(AADObjectType objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Set the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @param maxDegreeOfParallelismPerJob the maxDegreeOfParallelismPerJob value to set + * @return the CreateComputePolicyWithAccountParameters object itself. + */ + public CreateComputePolicyWithAccountParameters withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + this.maxDegreeOfParallelismPerJob = maxDegreeOfParallelismPerJob; + return this; + } + + /** + * Get the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Set the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @param minPriorityPerJob the minPriorityPerJob value to set + * @return the CreateComputePolicyWithAccountParameters object itself. + */ + public CreateComputePolicyWithAccountParameters withMinPriorityPerJob(Integer minPriorityPerJob) { + this.minPriorityPerJob = minPriorityPerJob; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateDataLakeAnalyticsAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateDataLakeAnalyticsAccountParameters.java new file mode 100644 index 0000000000000..454879fb51abe --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateDataLakeAnalyticsAccountParameters.java @@ -0,0 +1,418 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters to use for creating a Data Lake Analytics account. + */ +@JsonFlatten +public class CreateDataLakeAnalyticsAccountParameters { + /** + * The resource location. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The default Data Lake Store account associated with this account. + */ + @JsonProperty(value = "properties.defaultDataLakeStoreAccount", required = true) + private String defaultDataLakeStoreAccount; + + /** + * The list of Data Lake Store accounts associated with this account. + */ + @JsonProperty(value = "properties.dataLakeStoreAccounts", required = true) + private List dataLakeStoreAccounts; + + /** + * The list of Azure Blob Storage accounts associated with this account. + */ + @JsonProperty(value = "properties.storageAccounts") + private List storageAccounts; + + /** + * The list of compute policies associated with this account. + */ + @JsonProperty(value = "properties.computePolicies") + private List computePolicies; + + /** + * The list of firewall rules associated with this account. + */ + @JsonProperty(value = "properties.firewallRules") + private List firewallRules; + + /** + * The current state of the IP address firewall for this account. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallState") + private FirewallState firewallState; + + /** + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallAllowAzureIps") + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /** + * The commitment tier for the next month. Possible values include: + * 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', + * 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + */ + @JsonProperty(value = "properties.newTier") + private TierType newTier; + + /** + * The maximum supported jobs running under the account at the same time. + */ + @JsonProperty(value = "properties.maxJobCount") + private Integer maxJobCount; + + /** + * The maximum supported degree of parallelism for this account. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelism") + private Integer maxDegreeOfParallelism; + + /** + * The maximum supported degree of parallelism per job for this account. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob") + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum supported priority per job for this account. + */ + @JsonProperty(value = "properties.minPriorityPerJob") + private Integer minPriorityPerJob; + + /** + * The number of days that job metadata is retained. + */ + @JsonProperty(value = "properties.queryStoreRetention") + private Integer queryStoreRetention; + + /** + * Get the resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the resource location. + * + * @param location the location value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the resource tags. + * + * @param tags the tags value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the default Data Lake Store account associated with this account. + * + * @return the defaultDataLakeStoreAccount value + */ + public String defaultDataLakeStoreAccount() { + return this.defaultDataLakeStoreAccount; + } + + /** + * Set the default Data Lake Store account associated with this account. + * + * @param defaultDataLakeStoreAccount the defaultDataLakeStoreAccount value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withDefaultDataLakeStoreAccount(String defaultDataLakeStoreAccount) { + this.defaultDataLakeStoreAccount = defaultDataLakeStoreAccount; + return this; + } + + /** + * Get the list of Data Lake Store accounts associated with this account. + * + * @return the dataLakeStoreAccounts value + */ + public List dataLakeStoreAccounts() { + return this.dataLakeStoreAccounts; + } + + /** + * Set the list of Data Lake Store accounts associated with this account. + * + * @param dataLakeStoreAccounts the dataLakeStoreAccounts value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withDataLakeStoreAccounts(List dataLakeStoreAccounts) { + this.dataLakeStoreAccounts = dataLakeStoreAccounts; + return this; + } + + /** + * Get the list of Azure Blob Storage accounts associated with this account. + * + * @return the storageAccounts value + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the list of Azure Blob Storage accounts associated with this account. + * + * @param storageAccounts the storageAccounts value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + + /** + * Get the list of compute policies associated with this account. + * + * @return the computePolicies value + */ + public List computePolicies() { + return this.computePolicies; + } + + /** + * Set the list of compute policies associated with this account. + * + * @param computePolicies the computePolicies value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withComputePolicies(List computePolicies) { + this.computePolicies = computePolicies; + return this; + } + + /** + * Get the list of firewall rules associated with this account. + * + * @return the firewallRules value + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Set the list of firewall rules associated with this account. + * + * @param firewallRules the firewallRules value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withFirewallRules(List firewallRules) { + this.firewallRules = firewallRules; + return this; + } + + /** + * Get the current state of the IP address firewall for this account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallState value + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Set the current state of the IP address firewall for this account. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallState the firewallState value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withFirewallState(FirewallState firewallState) { + this.firewallState = firewallState; + return this; + } + + /** + * Get the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallAllowAzureIps value + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Set the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallAllowAzureIps the firewallAllowAzureIps value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps) { + this.firewallAllowAzureIps = firewallAllowAzureIps; + return this; + } + + /** + * Get the commitment tier for the next month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + * + * @return the newTier value + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Set the commitment tier for the next month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + * + * @param newTier the newTier value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withNewTier(TierType newTier) { + this.newTier = newTier; + return this; + } + + /** + * Get the maximum supported jobs running under the account at the same time. + * + * @return the maxJobCount value + */ + public Integer maxJobCount() { + return this.maxJobCount; + } + + /** + * Set the maximum supported jobs running under the account at the same time. + * + * @param maxJobCount the maxJobCount value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withMaxJobCount(Integer maxJobCount) { + this.maxJobCount = maxJobCount; + return this; + } + + /** + * Get the maximum supported degree of parallelism for this account. + * + * @return the maxDegreeOfParallelism value + */ + public Integer maxDegreeOfParallelism() { + return this.maxDegreeOfParallelism; + } + + /** + * Set the maximum supported degree of parallelism for this account. + * + * @param maxDegreeOfParallelism the maxDegreeOfParallelism value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism) { + this.maxDegreeOfParallelism = maxDegreeOfParallelism; + return this; + } + + /** + * Get the maximum supported degree of parallelism per job for this account. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Set the maximum supported degree of parallelism per job for this account. + * + * @param maxDegreeOfParallelismPerJob the maxDegreeOfParallelismPerJob value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + this.maxDegreeOfParallelismPerJob = maxDegreeOfParallelismPerJob; + return this; + } + + /** + * Get the minimum supported priority per job for this account. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Set the minimum supported priority per job for this account. + * + * @param minPriorityPerJob the minPriorityPerJob value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withMinPriorityPerJob(Integer minPriorityPerJob) { + this.minPriorityPerJob = minPriorityPerJob; + return this; + } + + /** + * Get the number of days that job metadata is retained. + * + * @return the queryStoreRetention value + */ + public Integer queryStoreRetention() { + return this.queryStoreRetention; + } + + /** + * Set the number of days that job metadata is retained. + * + * @param queryStoreRetention the queryStoreRetention value to set + * @return the CreateDataLakeAnalyticsAccountParameters object itself. + */ + public CreateDataLakeAnalyticsAccountParameters withQueryStoreRetention(Integer queryStoreRetention) { + this.queryStoreRetention = queryStoreRetention; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateFirewallRuleWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateFirewallRuleWithAccountParameters.java new file mode 100644 index 0000000000000..4defc33373c39 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateFirewallRuleWithAccountParameters.java @@ -0,0 +1,100 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new firewall rule while creating a new Data + * Lake Analytics account. + */ +@JsonFlatten +public class CreateFirewallRuleWithAccountParameters { + /** + * The unique name of the firewall rule to create. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress", required = true) + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress", required = true) + private String endIpAddress; + + /** + * Get the unique name of the firewall rule to create. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the firewall rule to create. + * + * @param name the name value to set + * @return the CreateFirewallRuleWithAccountParameters object itself. + */ + public CreateFirewallRuleWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the CreateFirewallRuleWithAccountParameters object itself. + */ + public CreateFirewallRuleWithAccountParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the CreateFirewallRuleWithAccountParameters object itself. + */ + public CreateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateComputePolicyParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateComputePolicyParameters.java new file mode 100644 index 0000000000000..96c820ddbb464 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateComputePolicyParameters.java @@ -0,0 +1,129 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new compute policy. + */ +@JsonFlatten +public class CreateOrUpdateComputePolicyParameters { + /** + * The AAD object identifier for the entity to create a policy for. + */ + @JsonProperty(value = "properties.objectId", required = true) + private UUID objectId; + + /** + * The type of AAD object the object identifier refers to. Possible values + * include: 'User', 'Group', 'ServicePrincipal'. + */ + @JsonProperty(value = "properties.objectType", required = true) + private AADObjectType objectType; + + /** + * The maximum degree of parallelism per job this user can use to submit + * jobs. This property, the min priority per job property, or both must be + * passed. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob") + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum priority per job this user can use to submit jobs. This + * property, the max degree of parallelism per job property, or both must + * be passed. + */ + @JsonProperty(value = "properties.minPriorityPerJob") + private Integer minPriorityPerJob; + + /** + * Get the AAD object identifier for the entity to create a policy for. + * + * @return the objectId value + */ + public UUID objectId() { + return this.objectId; + } + + /** + * Set the AAD object identifier for the entity to create a policy for. + * + * @param objectId the objectId value to set + * @return the CreateOrUpdateComputePolicyParameters object itself. + */ + public CreateOrUpdateComputePolicyParameters withObjectId(UUID objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @return the objectType value + */ + public AADObjectType objectType() { + return this.objectType; + } + + /** + * Set the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @param objectType the objectType value to set + * @return the CreateOrUpdateComputePolicyParameters object itself. + */ + public CreateOrUpdateComputePolicyParameters withObjectType(AADObjectType objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Set the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @param maxDegreeOfParallelismPerJob the maxDegreeOfParallelismPerJob value to set + * @return the CreateOrUpdateComputePolicyParameters object itself. + */ + public CreateOrUpdateComputePolicyParameters withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + this.maxDegreeOfParallelismPerJob = maxDegreeOfParallelismPerJob; + return this; + } + + /** + * Get the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Set the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @param minPriorityPerJob the minPriorityPerJob value to set + * @return the CreateOrUpdateComputePolicyParameters object itself. + */ + public CreateOrUpdateComputePolicyParameters withMinPriorityPerJob(Integer minPriorityPerJob) { + this.minPriorityPerJob = minPriorityPerJob; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateFirewallRuleParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateFirewallRuleParameters.java new file mode 100644 index 0000000000000..2c4aa5bbdbb53 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/CreateOrUpdateFirewallRuleParameters.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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new firewall rule. + */ +@JsonFlatten +public class CreateOrUpdateFirewallRuleParameters { + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress", required = true) + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress", required = true) + private String endIpAddress; + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the CreateOrUpdateFirewallRuleParameters object itself. + */ + public CreateOrUpdateFirewallRuleParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the CreateOrUpdateFirewallRuleParameters object itself. + */ + public CreateOrUpdateFirewallRuleParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccount.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccount.java new file mode 100644 index 0000000000000..b1e7bd2076805 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccount.java @@ -0,0 +1,481 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsAccountInner; + +/** + * Type representing DataLakeAnalyticsAccount. + */ +public interface DataLakeAnalyticsAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the accountId value. + */ + UUID accountId(); + + /** + * @return the computePolicies value. + */ + List computePolicies(); + + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the currentTier value. + */ + TierType currentTier(); + + /** + * @return the dataLakeStoreAccounts value. + */ + List dataLakeStoreAccounts(); + + /** + * @return the defaultDataLakeStoreAccount value. + */ + String defaultDataLakeStoreAccount(); + + /** + * @return the endpoint value. + */ + String endpoint(); + + /** + * @return the firewallAllowAzureIps value. + */ + FirewallAllowAzureIpsState firewallAllowAzureIps(); + + /** + * @return the firewallRules value. + */ + List firewallRules(); + + /** + * @return the firewallState value. + */ + FirewallState firewallState(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the maxDegreeOfParallelism value. + */ + Integer maxDegreeOfParallelism(); + + /** + * @return the maxDegreeOfParallelismPerJob value. + */ + Integer maxDegreeOfParallelismPerJob(); + + /** + * @return the maxJobCount value. + */ + Integer maxJobCount(); + + /** + * @return the minPriorityPerJob value. + */ + Integer minPriorityPerJob(); + + /** + * @return the newTier value. + */ + TierType newTier(); + + /** + * @return the provisioningState value. + */ + DataLakeAnalyticsAccountStatus provisioningState(); + + /** + * @return the queryStoreRetention value. + */ + Integer queryStoreRetention(); + + /** + * @return the state value. + */ + DataLakeAnalyticsAccountState state(); + + /** + * @return the storageAccounts value. + */ + List storageAccounts(); + + /** + * @return the systemMaxDegreeOfParallelism value. + */ + Integer systemMaxDegreeOfParallelism(); + + /** + * @return the systemMaxJobCount value. + */ + Integer systemMaxJobCount(); + + /** + * The entirety of the DataLakeAnalyticsAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithDataLakeStoreAccounts, DefinitionStages.WithDefaultDataLakeStoreAccount, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataLakeAnalyticsAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataLakeAnalyticsAccount definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DataLakeAnalyticsAccount definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify DataLakeStoreAccounts. + */ + interface WithDataLakeStoreAccounts { + /** + * Specifies dataLakeStoreAccounts. + * @param dataLakeStoreAccounts The list of Data Lake Store accounts associated with this account + * @return the next definition stage +*/ + WithDefaultDataLakeStoreAccount withDataLakeStoreAccountsForCreate(List dataLakeStoreAccounts); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify DefaultDataLakeStoreAccount. + */ + interface WithDefaultDataLakeStoreAccount { + /** + * Specifies defaultDataLakeStoreAccount. + * @param defaultDataLakeStoreAccount The default Data Lake Store account associated with this account + * @return the next definition stage +*/ + WithCreate withDefaultDataLakeStoreAccount(String defaultDataLakeStoreAccount); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify ComputePolicies. + */ + interface WithComputePolicies { + /** + * Specifies computePolicies. + * @param computePolicies The list of compute policies associated with this account + * @return the next definition stage + */ + WithCreate withComputePoliciesForCreate(List computePolicies); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify FirewallAllowAzureIps. + */ + interface WithFirewallAllowAzureIps { + /** + * Specifies firewallAllowAzureIps. + * @param firewallAllowAzureIps The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify FirewallRules. + */ + interface WithFirewallRules { + /** + * Specifies firewallRules. + * @param firewallRules The list of firewall rules associated with this account + * @return the next definition stage + */ + WithCreate withFirewallRulesForCreate(List firewallRules); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify FirewallState. + */ + interface WithFirewallState { + /** + * Specifies firewallState. + * @param firewallState The current state of the IP address firewall for this account. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withFirewallState(FirewallState firewallState); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify MaxDegreeOfParallelism. + */ + interface WithMaxDegreeOfParallelism { + /** + * Specifies maxDegreeOfParallelism. + * @param maxDegreeOfParallelism The maximum supported degree of parallelism for this account + * @return the next definition stage + */ + WithCreate withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify MaxDegreeOfParallelismPerJob. + */ + interface WithMaxDegreeOfParallelismPerJob { + /** + * Specifies maxDegreeOfParallelismPerJob. + * @param maxDegreeOfParallelismPerJob The maximum supported degree of parallelism per job for this account + * @return the next definition stage + */ + WithCreate withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify MaxJobCount. + */ + interface WithMaxJobCount { + /** + * Specifies maxJobCount. + * @param maxJobCount The maximum supported jobs running under the account at the same time + * @return the next definition stage + */ + WithCreate withMaxJobCount(Integer maxJobCount); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify MinPriorityPerJob. + */ + interface WithMinPriorityPerJob { + /** + * Specifies minPriorityPerJob. + * @param minPriorityPerJob The minimum supported priority per job for this account + * @return the next definition stage + */ + WithCreate withMinPriorityPerJob(Integer minPriorityPerJob); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify NewTier. + */ + interface WithNewTier { + /** + * Specifies newTier. + * @param newTier The commitment tier for the next month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @return the next definition stage + */ + WithCreate withNewTier(TierType newTier); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify QueryStoreRetention. + */ + interface WithQueryStoreRetention { + /** + * Specifies queryStoreRetention. + * @param queryStoreRetention The number of days that job metadata is retained + * @return the next definition stage + */ + WithCreate withQueryStoreRetention(Integer queryStoreRetention); + } + + /** + * The stage of the datalakeanalyticsaccount definition allowing to specify StorageAccounts. + */ + interface WithStorageAccounts { + /** + * Specifies storageAccounts. + * @param storageAccounts The list of Azure Blob Storage accounts associated with this account + * @return the next definition stage + */ + WithCreate withStorageAccountsForCreate(List storageAccounts); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithComputePolicies, DefinitionStages.WithFirewallAllowAzureIps, DefinitionStages.WithFirewallRules, DefinitionStages.WithFirewallState, DefinitionStages.WithMaxDegreeOfParallelism, DefinitionStages.WithMaxDegreeOfParallelismPerJob, DefinitionStages.WithMaxJobCount, DefinitionStages.WithMinPriorityPerJob, DefinitionStages.WithNewTier, DefinitionStages.WithQueryStoreRetention, DefinitionStages.WithStorageAccounts { + } + } + /** + * The template for a DataLakeAnalyticsAccount update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithComputePolicies, UpdateStages.WithDataLakeStoreAccounts, UpdateStages.WithFirewallAllowAzureIps, UpdateStages.WithFirewallRules, UpdateStages.WithFirewallState, UpdateStages.WithMaxDegreeOfParallelism, UpdateStages.WithMaxDegreeOfParallelismPerJob, UpdateStages.WithMaxJobCount, UpdateStages.WithMinPriorityPerJob, UpdateStages.WithNewTier, UpdateStages.WithQueryStoreRetention, UpdateStages.WithStorageAccounts { + } + + /** + * Grouping of DataLakeAnalyticsAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the datalakeanalyticsaccount update allowing to specify ComputePolicies. + */ + interface WithComputePolicies { + /** + * Specifies computePolicies. + * @param computePolicies The list of compute policies associated with this account + * @return the next update stage + */ + Update withComputePoliciesForUpdate(List computePolicies); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify DataLakeStoreAccounts. + */ + interface WithDataLakeStoreAccounts { + /** + * Specifies dataLakeStoreAccounts. + * @param dataLakeStoreAccounts The list of Data Lake Store accounts associated with this account + * @return the next update stage + */ + Update withDataLakeStoreAccountsForUpdate(List dataLakeStoreAccounts); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify FirewallAllowAzureIps. + */ + interface WithFirewallAllowAzureIps { + /** + * Specifies firewallAllowAzureIps. + * @param firewallAllowAzureIps The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify FirewallRules. + */ + interface WithFirewallRules { + /** + * Specifies firewallRules. + * @param firewallRules The list of firewall rules associated with this account + * @return the next update stage + */ + Update withFirewallRulesForUpdate(List firewallRules); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify FirewallState. + */ + interface WithFirewallState { + /** + * Specifies firewallState. + * @param firewallState The current state of the IP address firewall for this account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withFirewallState(FirewallState firewallState); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify MaxDegreeOfParallelism. + */ + interface WithMaxDegreeOfParallelism { + /** + * Specifies maxDegreeOfParallelism. + * @param maxDegreeOfParallelism The maximum supported degree of parallelism for this account + * @return the next update stage + */ + Update withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify MaxDegreeOfParallelismPerJob. + */ + interface WithMaxDegreeOfParallelismPerJob { + /** + * Specifies maxDegreeOfParallelismPerJob. + * @param maxDegreeOfParallelismPerJob The maximum supported degree of parallelism per job for this account + * @return the next update stage + */ + Update withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify MaxJobCount. + */ + interface WithMaxJobCount { + /** + * Specifies maxJobCount. + * @param maxJobCount The maximum supported jobs running under the account at the same time + * @return the next update stage + */ + Update withMaxJobCount(Integer maxJobCount); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify MinPriorityPerJob. + */ + interface WithMinPriorityPerJob { + /** + * Specifies minPriorityPerJob. + * @param minPriorityPerJob The minimum supported priority per job for this account + * @return the next update stage + */ + Update withMinPriorityPerJob(Integer minPriorityPerJob); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify NewTier. + */ + interface WithNewTier { + /** + * Specifies newTier. + * @param newTier The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @return the next update stage + */ + Update withNewTier(TierType newTier); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify QueryStoreRetention. + */ + interface WithQueryStoreRetention { + /** + * Specifies queryStoreRetention. + * @param queryStoreRetention The number of days that job metadata is retained + * @return the next update stage + */ + Update withQueryStoreRetention(Integer queryStoreRetention); + } + + /** + * The stage of the datalakeanalyticsaccount update allowing to specify StorageAccounts. + */ + interface WithStorageAccounts { + /** + * Specifies storageAccounts. + * @param storageAccounts The list of Azure Blob storage accounts associated with this account + * @return the next update stage + */ + Update withStorageAccountsForUpdate(List storageAccounts); + } + + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountState.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountState.java new file mode 100644 index 0000000000000..de9e52b00b9b7 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountState.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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeAnalyticsAccountState. + */ +public enum DataLakeAnalyticsAccountState { + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Suspended. */ + SUSPENDED("Suspended"); + + /** The actual serialized value for a DataLakeAnalyticsAccountState instance. */ + private String value; + + DataLakeAnalyticsAccountState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeAnalyticsAccountState instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeAnalyticsAccountState object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeAnalyticsAccountState fromString(String value) { + DataLakeAnalyticsAccountState[] items = DataLakeAnalyticsAccountState.values(); + for (DataLakeAnalyticsAccountState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountStatus.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountStatus.java new file mode 100644 index 0000000000000..a71ca5fe65385 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeAnalyticsAccountStatus.java @@ -0,0 +1,80 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeAnalyticsAccountStatus. + */ +public enum DataLakeAnalyticsAccountStatus { + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Patching. */ + PATCHING("Patching"), + + /** Enum value Suspending. */ + SUSPENDING("Suspending"), + + /** Enum value Resuming. */ + RESUMING("Resuming"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Deleted. */ + DELETED("Deleted"), + + /** Enum value Undeleting. */ + UNDELETING("Undeleting"), + + /** Enum value Canceled. */ + CANCELED("Canceled"); + + /** The actual serialized value for a DataLakeAnalyticsAccountStatus instance. */ + private String value; + + DataLakeAnalyticsAccountStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeAnalyticsAccountStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeAnalyticsAccountStatus object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeAnalyticsAccountStatus fromString(String value) { + DataLakeAnalyticsAccountStatus[] items = DataLakeAnalyticsAccountStatus.values(); + for (DataLakeAnalyticsAccountStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccountInformation.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccountInformation.java new file mode 100644 index 0000000000000..a3310577903b5 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccountInformation.java @@ -0,0 +1,42 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeStoreAccountInformationInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; + +/** + * Type representing DataLakeStoreAccountInformation. + */ +public interface DataLakeStoreAccountInformation extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the suffix value. + */ + String suffix(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccounts.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccounts.java new file mode 100644 index 0000000000000..cfe0a80fc236c --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/DataLakeStoreAccounts.java @@ -0,0 +1,63 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeStoreAccountsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DataLakeStoreAccounts. + */ +public interface DataLakeStoreAccounts extends HasInner { + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName); + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName); + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable addAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallAllowAzureIpsState.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallAllowAzureIpsState.java new file mode 100644 index 0000000000000..89e9ca8903e1d --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallAllowAzureIpsState.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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FirewallAllowAzureIpsState. + */ +public enum FirewallAllowAzureIpsState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a FirewallAllowAzureIpsState instance. */ + private String value; + + FirewallAllowAzureIpsState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FirewallAllowAzureIpsState instance. + * + * @param value the serialized value to parse. + * @return the parsed FirewallAllowAzureIpsState object, or null if unable to parse. + */ + @JsonCreator + public static FirewallAllowAzureIpsState fromString(String value) { + FirewallAllowAzureIpsState[] items = FirewallAllowAzureIpsState.values(); + for (FirewallAllowAzureIpsState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRule.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRule.java new file mode 100644 index 0000000000000..b52386b83fd88 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRule.java @@ -0,0 +1,146 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.FirewallRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; + +/** + * Type representing FirewallRule. + */ +public interface FirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the endIpAddress value. + */ + String endIpAddress(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the startIpAddress value. + */ + String startIpAddress(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the FirewallRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAccount, DefinitionStages.WithEndIpAddress, DefinitionStages.WithStartIpAddress, DefinitionStages.WithCreate { + } + + /** + * Grouping of FirewallRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FirewallRule definition. + */ + interface Blank extends WithAccount { + } + + /** + * The stage of the firewallrule definition allowing to specify Account. + */ + interface WithAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the Azure resource group + * @param accountName The name of the Data Lake Analytics account + * @return the next definition stage + */ + WithEndIpAddress withExistingAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the firewallrule definition allowing to specify EndIpAddress. + */ + interface WithEndIpAddress { + /** + * Specifies endIpAddress. + * @param endIpAddress The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next definition stage + */ + WithStartIpAddress withEndIpAddress(String endIpAddress); + } + + /** + * The stage of the firewallrule definition allowing to specify StartIpAddress. + */ + interface WithStartIpAddress { + /** + * Specifies startIpAddress. + * @param startIpAddress The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next definition stage + */ + WithCreate withStartIpAddress(String startIpAddress); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a FirewallRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEndIpAddress, UpdateStages.WithStartIpAddress { + } + + /** + * Grouping of FirewallRule update stages. + */ + interface UpdateStages { + /** + * The stage of the firewallrule update allowing to specify EndIpAddress. + */ + interface WithEndIpAddress { + /** + * Specifies endIpAddress. + * @param endIpAddress The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next update stage + */ + Update withEndIpAddress(String endIpAddress); + } + + /** + * The stage of the firewallrule update allowing to specify StartIpAddress. + */ + interface WithStartIpAddress { + /** + * Specifies startIpAddress. + * @param startIpAddress The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next update stage + */ + Update withStartIpAddress(String startIpAddress); + } + + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRules.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRules.java new file mode 100644 index 0000000000000..efd6587f17e25 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallRules.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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.FirewallRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing FirewallRules. + */ +public interface FirewallRules extends SupportsCreating, HasInner { + /** + * Gets the specified Data Lake Analytics firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String firewallRuleName); + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified firewall rule from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String firewallRuleName); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallState.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallState.java new file mode 100644 index 0000000000000..54abcb5819cde --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/FirewallState.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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FirewallState. + */ +public enum FirewallState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a FirewallState instance. */ + private String value; + + FirewallState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FirewallState instance. + * + * @param value the serialized value to parse. + * @return the parsed FirewallState object, or null if unable to parse. + */ + @JsonCreator + public static FirewallState fromString(String value) { + FirewallState[] items = FirewallState.values(); + for (FirewallState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Locations.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Locations.java new file mode 100644 index 0000000000000..24e18ea978eee --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Locations.java @@ -0,0 +1,28 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.LocationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Locations. + */ +public interface Locations extends HasInner { + /** + * Gets subscription-level properties and limits for Data Lake Analytics specified by resource location. + * + * @param location The resource location without whitespace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getCapabilityAsync(String location); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/NameAvailabilityInformation.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/NameAvailabilityInformation.java new file mode 100644 index 0000000000000..057884426330f --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/NameAvailabilityInformation.java @@ -0,0 +1,35 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.NameAvailabilityInformationInner; + +/** + * Type representing NameAvailabilityInformation. + */ +public interface NameAvailabilityInformation extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + String reason(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationDisplay.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationDisplay.java new file mode 100644 index 0000000000000..7084f17772cbd --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationDisplay.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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The display information for a particular operation. + */ +public class OperationDisplay { + /** + * The resource provider of the operation. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * The resource type of the operation. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * A friendly name of the operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * A friendly description of the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the resource provider of the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource type of the operation. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get a friendly name of the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get a friendly description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationListResult.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationListResult.java new file mode 100644 index 0000000000000..3b2f4a3b1bbb0 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationListResult.java @@ -0,0 +1,32 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.OperationListResultInner; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.OperationInner; +import java.util.List; + +/** + * Type representing OperationListResult. + */ +public interface OperationListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationOrigin.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationOrigin.java new file mode 100644 index 0000000000000..c35cb25e96473 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/OperationOrigin.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.management.datalakeanalytics.v2016_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OperationOrigin. + */ +public final class OperationOrigin extends ExpandableStringEnum { + /** Static value user for OperationOrigin. */ + public static final OperationOrigin USER = fromString("user"); + + /** Static value system for OperationOrigin. */ + public static final OperationOrigin SYSTEM = fromString("system"); + + /** Static value user,system for OperationOrigin. */ + public static final OperationOrigin USERSYSTEM = fromString("user,system"); + + /** + * Creates or finds a OperationOrigin from its string representation. + * @param name a name to look for + * @return the corresponding OperationOrigin + */ + @JsonCreator + public static OperationOrigin fromString(String name) { + return fromString(name, OperationOrigin.class); + } + + /** + * @return known OperationOrigin values + */ + public static Collection values() { + return values(OperationOrigin.class); + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Operations.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Operations.java new file mode 100644 index 0000000000000..fa2464d1dc216 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/Operations.java @@ -0,0 +1,27 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SasTokenInformation.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SasTokenInformation.java new file mode 100644 index 0000000000000..71b62d38c0cbc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SasTokenInformation.java @@ -0,0 +1,25 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.SasTokenInformationInner; + +/** + * Type representing SasTokenInformation. + */ +public interface SasTokenInformation extends HasInner, HasManager { + /** + * @return the accessToken value. + */ + String accessToken(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccountInformation.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccountInformation.java new file mode 100644 index 0000000000000..b3d0f365d1ae4 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccountInformation.java @@ -0,0 +1,42 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.StorageAccountInformationInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; + +/** + * Type representing StorageAccountInformation. + */ +public interface StorageAccountInformation extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the suffix value. + */ + String suffix(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccounts.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccounts.java new file mode 100644 index 0000000000000..5c3cc75b381df --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageAccounts.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.management.datalakeanalytics.v2016_11_01; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.StorageAccountsInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageContainer; + +/** + * Type representing StorageAccounts. + */ +public interface StorageAccounts extends HasInner { + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable updateAsync(String resourceGroupName, String accountName, String storageAccountName); + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String storageAccountName); + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String storageAccountName); + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable addAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters); + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName); + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName); + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageContainer.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageContainer.java new file mode 100644 index 0000000000000..5dba6604b960e --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/StorageContainer.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.management.datalakeanalytics.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.StorageContainerInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager; +import org.joda.time.DateTime; + +/** + * Type representing StorageContainer. + */ +public interface StorageContainer extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SubscriptionState.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SubscriptionState.java new file mode 100644 index 0000000000000..bdad93cffc75b --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/SubscriptionState.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.management.datalakeanalytics.v2016_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SubscriptionState. + */ +public final class SubscriptionState extends ExpandableStringEnum { + /** Static value Registered for SubscriptionState. */ + public static final SubscriptionState REGISTERED = fromString("Registered"); + + /** Static value Suspended for SubscriptionState. */ + public static final SubscriptionState SUSPENDED = fromString("Suspended"); + + /** Static value Deleted for SubscriptionState. */ + public static final SubscriptionState DELETED = fromString("Deleted"); + + /** Static value Unregistered for SubscriptionState. */ + public static final SubscriptionState UNREGISTERED = fromString("Unregistered"); + + /** Static value Warned for SubscriptionState. */ + public static final SubscriptionState WARNED = fromString("Warned"); + + /** + * Creates or finds a SubscriptionState from its string representation. + * @param name a name to look for + * @return the corresponding SubscriptionState + */ + @JsonCreator + public static SubscriptionState fromString(String name) { + return fromString(name, SubscriptionState.class); + } + + /** + * @return known SubscriptionState values + */ + public static Collection values() { + return values(SubscriptionState.class); + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/TierType.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/TierType.java new file mode 100644 index 0000000000000..29c6ab8d39f79 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/TierType.java @@ -0,0 +1,74 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TierType. + */ +public enum TierType { + /** Enum value Consumption. */ + CONSUMPTION("Consumption"), + + /** Enum value Commitment_100AUHours. */ + COMMITMENT_100AUHOURS("Commitment_100AUHours"), + + /** Enum value Commitment_500AUHours. */ + COMMITMENT_500AUHOURS("Commitment_500AUHours"), + + /** Enum value Commitment_1000AUHours. */ + COMMITMENT_1000AUHOURS("Commitment_1000AUHours"), + + /** Enum value Commitment_5000AUHours. */ + COMMITMENT_5000AUHOURS("Commitment_5000AUHours"), + + /** Enum value Commitment_10000AUHours. */ + COMMITMENT_10000AUHOURS("Commitment_10000AUHours"), + + /** Enum value Commitment_50000AUHours. */ + COMMITMENT_50000AUHOURS("Commitment_50000AUHours"), + + /** Enum value Commitment_100000AUHours. */ + COMMITMENT_100000AUHOURS("Commitment_100000AUHours"), + + /** Enum value Commitment_500000AUHours. */ + COMMITMENT_500000AUHOURS("Commitment_500000AUHours"); + + /** The actual serialized value for a TierType instance. */ + private String value; + + TierType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TierType instance. + * + * @param value the serialized value to parse. + * @return the parsed TierType object, or null if unable to parse. + */ + @JsonCreator + public static TierType fromString(String value) { + TierType[] items = TierType.values(); + for (TierType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyParameters.java new file mode 100644 index 0000000000000..6c11087b8cfcc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyParameters.java @@ -0,0 +1,129 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a compute policy. + */ +@JsonFlatten +public class UpdateComputePolicyParameters { + /** + * The AAD object identifier for the entity to create a policy for. + */ + @JsonProperty(value = "properties.objectId") + private UUID objectId; + + /** + * The type of AAD object the object identifier refers to. Possible values + * include: 'User', 'Group', 'ServicePrincipal'. + */ + @JsonProperty(value = "properties.objectType") + private AADObjectType objectType; + + /** + * The maximum degree of parallelism per job this user can use to submit + * jobs. This property, the min priority per job property, or both must be + * passed. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob") + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum priority per job this user can use to submit jobs. This + * property, the max degree of parallelism per job property, or both must + * be passed. + */ + @JsonProperty(value = "properties.minPriorityPerJob") + private Integer minPriorityPerJob; + + /** + * Get the AAD object identifier for the entity to create a policy for. + * + * @return the objectId value + */ + public UUID objectId() { + return this.objectId; + } + + /** + * Set the AAD object identifier for the entity to create a policy for. + * + * @param objectId the objectId value to set + * @return the UpdateComputePolicyParameters object itself. + */ + public UpdateComputePolicyParameters withObjectId(UUID objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @return the objectType value + */ + public AADObjectType objectType() { + return this.objectType; + } + + /** + * Set the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @param objectType the objectType value to set + * @return the UpdateComputePolicyParameters object itself. + */ + public UpdateComputePolicyParameters withObjectType(AADObjectType objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Set the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @param maxDegreeOfParallelismPerJob the maxDegreeOfParallelismPerJob value to set + * @return the UpdateComputePolicyParameters object itself. + */ + public UpdateComputePolicyParameters withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + this.maxDegreeOfParallelismPerJob = maxDegreeOfParallelismPerJob; + return this; + } + + /** + * Get the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Set the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @param minPriorityPerJob the minPriorityPerJob value to set + * @return the UpdateComputePolicyParameters object itself. + */ + public UpdateComputePolicyParameters withMinPriorityPerJob(Integer minPriorityPerJob) { + this.minPriorityPerJob = minPriorityPerJob; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyWithAccountParameters.java new file mode 100644 index 0000000000000..8f399262929fa --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateComputePolicyWithAccountParameters.java @@ -0,0 +1,156 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a compute policy while updating a Data Lake + * Analytics account. + */ +@JsonFlatten +public class UpdateComputePolicyWithAccountParameters { + /** + * The unique name of the compute policy to update. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The AAD object identifier for the entity to create a policy for. + */ + @JsonProperty(value = "properties.objectId") + private UUID objectId; + + /** + * The type of AAD object the object identifier refers to. Possible values + * include: 'User', 'Group', 'ServicePrincipal'. + */ + @JsonProperty(value = "properties.objectType") + private AADObjectType objectType; + + /** + * The maximum degree of parallelism per job this user can use to submit + * jobs. This property, the min priority per job property, or both must be + * passed. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob") + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum priority per job this user can use to submit jobs. This + * property, the max degree of parallelism per job property, or both must + * be passed. + */ + @JsonProperty(value = "properties.minPriorityPerJob") + private Integer minPriorityPerJob; + + /** + * Get the unique name of the compute policy to update. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the compute policy to update. + * + * @param name the name value to set + * @return the UpdateComputePolicyWithAccountParameters object itself. + */ + public UpdateComputePolicyWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the AAD object identifier for the entity to create a policy for. + * + * @return the objectId value + */ + public UUID objectId() { + return this.objectId; + } + + /** + * Set the AAD object identifier for the entity to create a policy for. + * + * @param objectId the objectId value to set + * @return the UpdateComputePolicyWithAccountParameters object itself. + */ + public UpdateComputePolicyWithAccountParameters withObjectId(UUID objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @return the objectType value + */ + public AADObjectType objectType() { + return this.objectType; + } + + /** + * Set the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @param objectType the objectType value to set + * @return the UpdateComputePolicyWithAccountParameters object itself. + */ + public UpdateComputePolicyWithAccountParameters withObjectType(AADObjectType objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Set the maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + * + * @param maxDegreeOfParallelismPerJob the maxDegreeOfParallelismPerJob value to set + * @return the UpdateComputePolicyWithAccountParameters object itself. + */ + public UpdateComputePolicyWithAccountParameters withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + this.maxDegreeOfParallelismPerJob = maxDegreeOfParallelismPerJob; + return this; + } + + /** + * Get the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Set the minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + * + * @param minPriorityPerJob the minPriorityPerJob value to set + * @return the UpdateComputePolicyWithAccountParameters object itself. + */ + public UpdateComputePolicyWithAccountParameters withMinPriorityPerJob(Integer minPriorityPerJob) { + this.minPriorityPerJob = minPriorityPerJob; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeAnalyticsAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeAnalyticsAccountParameters.java new file mode 100644 index 0000000000000..519a969a8e177 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeAnalyticsAccountParameters.java @@ -0,0 +1,369 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters that can be used to update an existing Data Lake Analytics + * account. + */ +@JsonFlatten +public class UpdateDataLakeAnalyticsAccountParameters { + /** + * The resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The list of Data Lake Store accounts associated with this account. + */ + @JsonProperty(value = "properties.dataLakeStoreAccounts") + private List dataLakeStoreAccounts; + + /** + * The list of Azure Blob storage accounts associated with this account. + */ + @JsonProperty(value = "properties.storageAccounts") + private List storageAccounts; + + /** + * The list of compute policies associated with this account. + */ + @JsonProperty(value = "properties.computePolicies") + private List computePolicies; + + /** + * The list of firewall rules associated with this account. + */ + @JsonProperty(value = "properties.firewallRules") + private List firewallRules; + + /** + * The current state of the IP address firewall for this account. Disabling + * the firewall does not remove existing rules, they will just be ignored + * until the firewall is re-enabled. Possible values include: 'Enabled', + * 'Disabled'. + */ + @JsonProperty(value = "properties.firewallState") + private FirewallState firewallState; + + /** + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallAllowAzureIps") + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /** + * The commitment tier to use for next month. Possible values include: + * 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', + * 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + */ + @JsonProperty(value = "properties.newTier") + private TierType newTier; + + /** + * The maximum supported jobs running under the account at the same time. + */ + @JsonProperty(value = "properties.maxJobCount") + private Integer maxJobCount; + + /** + * The maximum supported degree of parallelism for this account. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelism") + private Integer maxDegreeOfParallelism; + + /** + * The maximum supported degree of parallelism per job for this account. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob") + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum supported priority per job for this account. + */ + @JsonProperty(value = "properties.minPriorityPerJob") + private Integer minPriorityPerJob; + + /** + * The number of days that job metadata is retained. + */ + @JsonProperty(value = "properties.queryStoreRetention") + private Integer queryStoreRetention; + + /** + * Get the resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the resource tags. + * + * @param tags the tags value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the list of Data Lake Store accounts associated with this account. + * + * @return the dataLakeStoreAccounts value + */ + public List dataLakeStoreAccounts() { + return this.dataLakeStoreAccounts; + } + + /** + * Set the list of Data Lake Store accounts associated with this account. + * + * @param dataLakeStoreAccounts the dataLakeStoreAccounts value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withDataLakeStoreAccounts(List dataLakeStoreAccounts) { + this.dataLakeStoreAccounts = dataLakeStoreAccounts; + return this; + } + + /** + * Get the list of Azure Blob storage accounts associated with this account. + * + * @return the storageAccounts value + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the list of Azure Blob storage accounts associated with this account. + * + * @param storageAccounts the storageAccounts value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + + /** + * Get the list of compute policies associated with this account. + * + * @return the computePolicies value + */ + public List computePolicies() { + return this.computePolicies; + } + + /** + * Set the list of compute policies associated with this account. + * + * @param computePolicies the computePolicies value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withComputePolicies(List computePolicies) { + this.computePolicies = computePolicies; + return this; + } + + /** + * Get the list of firewall rules associated with this account. + * + * @return the firewallRules value + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Set the list of firewall rules associated with this account. + * + * @param firewallRules the firewallRules value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withFirewallRules(List firewallRules) { + this.firewallRules = firewallRules; + return this; + } + + /** + * Get the current state of the IP address firewall for this account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallState value + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Set the current state of the IP address firewall for this account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallState the firewallState value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withFirewallState(FirewallState firewallState) { + this.firewallState = firewallState; + return this; + } + + /** + * Get the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallAllowAzureIps value + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Set the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallAllowAzureIps the firewallAllowAzureIps value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps) { + this.firewallAllowAzureIps = firewallAllowAzureIps; + return this; + } + + /** + * Get the commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + * + * @return the newTier value + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Set the commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + * + * @param newTier the newTier value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withNewTier(TierType newTier) { + this.newTier = newTier; + return this; + } + + /** + * Get the maximum supported jobs running under the account at the same time. + * + * @return the maxJobCount value + */ + public Integer maxJobCount() { + return this.maxJobCount; + } + + /** + * Set the maximum supported jobs running under the account at the same time. + * + * @param maxJobCount the maxJobCount value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withMaxJobCount(Integer maxJobCount) { + this.maxJobCount = maxJobCount; + return this; + } + + /** + * Get the maximum supported degree of parallelism for this account. + * + * @return the maxDegreeOfParallelism value + */ + public Integer maxDegreeOfParallelism() { + return this.maxDegreeOfParallelism; + } + + /** + * Set the maximum supported degree of parallelism for this account. + * + * @param maxDegreeOfParallelism the maxDegreeOfParallelism value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism) { + this.maxDegreeOfParallelism = maxDegreeOfParallelism; + return this; + } + + /** + * Get the maximum supported degree of parallelism per job for this account. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Set the maximum supported degree of parallelism per job for this account. + * + * @param maxDegreeOfParallelismPerJob the maxDegreeOfParallelismPerJob value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + this.maxDegreeOfParallelismPerJob = maxDegreeOfParallelismPerJob; + return this; + } + + /** + * Get the minimum supported priority per job for this account. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Set the minimum supported priority per job for this account. + * + * @param minPriorityPerJob the minPriorityPerJob value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withMinPriorityPerJob(Integer minPriorityPerJob) { + this.minPriorityPerJob = minPriorityPerJob; + return this; + } + + /** + * Get the number of days that job metadata is retained. + * + * @return the queryStoreRetention value + */ + public Integer queryStoreRetention() { + return this.queryStoreRetention; + } + + /** + * Set the number of days that job metadata is retained. + * + * @param queryStoreRetention the queryStoreRetention value to set + * @return the UpdateDataLakeAnalyticsAccountParameters object itself. + */ + public UpdateDataLakeAnalyticsAccountParameters withQueryStoreRetention(Integer queryStoreRetention) { + this.queryStoreRetention = queryStoreRetention; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeStoreWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeStoreWithAccountParameters.java new file mode 100644 index 0000000000000..3e4f4bdaa2f38 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateDataLakeStoreWithAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a Data Lake Store account while updating a + * Data Lake Analytics account. + */ +@JsonFlatten +public class UpdateDataLakeStoreWithAccountParameters { + /** + * The unique name of the Data Lake Store account to update. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The optional suffix for the Data Lake Store account. + */ + @JsonProperty(value = "properties.suffix") + private String suffix; + + /** + * Get the unique name of the Data Lake Store account to update. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the Data Lake Store account to update. + * + * @param name the name value to set + * @return the UpdateDataLakeStoreWithAccountParameters object itself. + */ + public UpdateDataLakeStoreWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the optional suffix for the Data Lake Store account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the Data Lake Store account. + * + * @param suffix the suffix value to set + * @return the UpdateDataLakeStoreWithAccountParameters object itself. + */ + public UpdateDataLakeStoreWithAccountParameters withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleParameters.java new file mode 100644 index 0000000000000..953bb9844b97e --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleParameters.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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a firewall rule. + */ +@JsonFlatten +public class UpdateFirewallRuleParameters { + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress") + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress") + private String endIpAddress; + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the UpdateFirewallRuleParameters object itself. + */ + public UpdateFirewallRuleParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the UpdateFirewallRuleParameters object itself. + */ + public UpdateFirewallRuleParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java new file mode 100644 index 0000000000000..ecb895fad53dc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java @@ -0,0 +1,100 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a firewall rule while updating a Data Lake + * Analytics account. + */ +@JsonFlatten +public class UpdateFirewallRuleWithAccountParameters { + /** + * The unique name of the firewall rule to update. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress") + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress") + private String endIpAddress; + + /** + * Get the unique name of the firewall rule to update. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the firewall rule to update. + * + * @param name the name value to set + * @return the UpdateFirewallRuleWithAccountParameters object itself. + */ + public UpdateFirewallRuleWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the UpdateFirewallRuleWithAccountParameters object itself. + */ + public UpdateFirewallRuleWithAccountParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the UpdateFirewallRuleWithAccountParameters object itself. + */ + public UpdateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountParameters.java new file mode 100644 index 0000000000000..31ca4e4a7cd7f --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update an Azure Storage account. + */ +@JsonFlatten +public class UpdateStorageAccountParameters { + /** + * The updated access key associated with this Azure Storage account that + * will be used to connect to it. + */ + @JsonProperty(value = "properties.accessKey") + private String accessKey; + + /** + * The optional suffix for the storage account. + */ + @JsonProperty(value = "properties.suffix") + private String suffix; + + /** + * Get the updated access key associated with this Azure Storage account that will be used to connect to it. + * + * @return the accessKey value + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Set the updated access key associated with this Azure Storage account that will be used to connect to it. + * + * @param accessKey the accessKey value to set + * @return the UpdateStorageAccountParameters object itself. + */ + public UpdateStorageAccountParameters withAccessKey(String accessKey) { + this.accessKey = accessKey; + return this; + } + + /** + * Get the optional suffix for the storage account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the storage account. + * + * @param suffix the suffix value to set + * @return the UpdateStorageAccountParameters object itself. + */ + public UpdateStorageAccountParameters withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountWithAccountParameters.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountWithAccountParameters.java new file mode 100644 index 0000000000000..0a5efe31c4f12 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/UpdateStorageAccountWithAccountParameters.java @@ -0,0 +1,99 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update an Azure Storage account while updating a Data + * Lake Analytics account. + */ +@JsonFlatten +public class UpdateStorageAccountWithAccountParameters { + /** + * The unique name of the Azure Storage account to update. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The updated access key associated with this Azure Storage account that + * will be used to connect to it. + */ + @JsonProperty(value = "properties.accessKey") + private String accessKey; + + /** + * The optional suffix for the storage account. + */ + @JsonProperty(value = "properties.suffix") + private String suffix; + + /** + * Get the unique name of the Azure Storage account to update. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the Azure Storage account to update. + * + * @param name the name value to set + * @return the UpdateStorageAccountWithAccountParameters object itself. + */ + public UpdateStorageAccountWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the updated access key associated with this Azure Storage account that will be used to connect to it. + * + * @return the accessKey value + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Set the updated access key associated with this Azure Storage account that will be used to connect to it. + * + * @param accessKey the accessKey value to set + * @return the UpdateStorageAccountWithAccountParameters object itself. + */ + public UpdateStorageAccountWithAccountParameters withAccessKey(String accessKey) { + this.accessKey = accessKey; + return this; + } + + /** + * Get the optional suffix for the storage account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Set the optional suffix for the storage account. + * + * @param suffix the suffix value to set + * @return the UpdateStorageAccountWithAccountParameters object itself. + */ + public UpdateStorageAccountWithAccountParameters withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsImpl.java new file mode 100644 index 0000000000000..7e328372cea83 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsImpl.java @@ -0,0 +1,203 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Accounts; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccount; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.arm.utils.PagedListConverter; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.NameAvailabilityInformation; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CheckNameAvailabilityParameters; + +class AccountsImpl extends GroupableResourcesCoreImpl implements Accounts { + protected AccountsImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().accounts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + AccountsInner client = this.inner(); + PagedListConverter converter = + new PagedListConverter() { + @Override + public Observable typeConvertAsync(DataLakeAnalyticsAccountBasicInner inner) { + return Observable.just(inner) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeAnalyticsAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccount call(DataLakeAnalyticsAccountInner inner) { + return wrapModel(inner); + } + }); + } + }; + return converter.convert(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AccountsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeAnalyticsAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccount call(DataLakeAnalyticsAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + AccountsInner client = this.inner(); + PagedListConverter converter = + new PagedListConverter() { + @Override + public Observable typeConvertAsync(DataLakeAnalyticsAccountBasicInner inner) { + return Observable.just(inner) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeAnalyticsAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccount call(DataLakeAnalyticsAccountInner inner) { + return wrapModel(inner); + } + }); + } + }; + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + AccountsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeAnalyticsAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccount call(DataLakeAnalyticsAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DataLakeAnalyticsAccountImpl define(String name) { + return wrapModel(name); + } + + @Override + protected DataLakeAnalyticsAccountImpl wrapModel(DataLakeAnalyticsAccountInner inner) { + return new DataLakeAnalyticsAccountImpl(inner.name(), inner, manager()); + } + + @Override + protected DataLakeAnalyticsAccountImpl wrapModel(String name) { + return new DataLakeAnalyticsAccountImpl(name, new DataLakeAnalyticsAccountInner(), this.manager()); + } + + @Override + public Observable checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters) { + AccountsInner client = this.inner(); + return client.checkNameAvailabilityAsync(location, parameters) + .map(new Func1() { + @Override + public NameAvailabilityInformation call(NameAvailabilityInformationInner inner) { + return new NameAvailabilityInformationImpl(inner, manager()); + } + }); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java new file mode 100644 index 0000000000000..683f23f5425ef --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java @@ -0,0 +1,1662 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CheckNameAvailabilityParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateDataLakeAnalyticsAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateDataLakeAnalyticsAccountParameters; +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.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 Accounts. + */ +public class AccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private AccountsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of AccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AccountsInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(AccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Accounts to be + * used by Retrofit to perform actually REST calls. + */ + interface AccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Accounts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}") + Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body CreateDataLakeAnalyticsAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}") + Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body CreateDataLakeAnalyticsAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body UpdateDataLakeAnalyticsAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body UpdateDataLakeAnalyticsAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Body CheckNameAvailabilityParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.Accounts listNext" }) + @GET + Observable> listNext(@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.management.datalakeanalytics.v2016_11_01.Accounts listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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<DataLakeAnalyticsAccountBasicInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeAnalyticsAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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 select = null; + final String orderby = null; + final Boolean count = null; + return service.list(this.client.subscriptionId(), filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 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<DataLakeAnalyticsAccountBasicInner> object if successful. + */ + public PagedList list(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listSinglePageAsync(filter, top, skip, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 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> listAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter, top, skip, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 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<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable> listAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listWithServiceResponseAsync(filter, top, skip, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + * @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 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<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listSinglePageAsync(filter, top, skip, 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(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. + * + 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 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<DataLakeAnalyticsAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), 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 first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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<DataLakeAnalyticsAccountBasicInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeAnalyticsAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName 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 select = null; + final String orderby = null; + final Boolean count = null; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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<DataLakeAnalyticsAccountBasicInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, top, skip, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, 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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + 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 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<DataLakeAnalyticsAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(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); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner create(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @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 resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + Observable> observable = service.create(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner beginCreate(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @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 beginCreateAsync(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to create a new Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + return service.beginCreate(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(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); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner update(String resourceGroupName, String accountName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 updateAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String accountName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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 UpdateDataLakeAnalyticsAccountParameters parameters = null; + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account 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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner update(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @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 updateAsync(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner beginUpdate(String resourceGroupName, String accountName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 beginUpdateAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String accountName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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 UpdateDataLakeAnalyticsAccountParameters parameters = null; + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account 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 DataLakeAnalyticsAccountInner object if successful. + */ + public DataLakeAnalyticsAccountInner beginUpdate(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @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 beginUpdateAsync(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeAnalyticsAccountInner>() { + @Override + public DataLakeAnalyticsAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param parameters Parameters supplied to the update Data Lake Analytics account operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeAnalyticsAccountInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, UpdateDataLakeAnalyticsAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 delete(String resourceGroupName, String accountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 beginDelete(String resourceGroupName, String accountName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 beginDeleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Begins the delete process for the Data Lake Analytics account object specified by the account name. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Analytics account name availability. + * @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 NameAvailabilityInformationInner object if successful. + */ + public NameAvailabilityInformationInner checkNameAvailability(String location, CheckNameAvailabilityParameters parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Analytics account name availability. + * @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 checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Analytics account name availability. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInformationInner object + */ + public Observable checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).map(new Func1, NameAvailabilityInformationInner>() { + @Override + public NameAvailabilityInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Analytics account name availability. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInformationInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, CheckNameAvailabilityParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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); + return service.checkNameAvailability(this.client.subscriptionId(), location, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(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 first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> 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(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> 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)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> 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); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, 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<DataLakeAnalyticsAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(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/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationImpl.java new file mode 100644 index 0000000000000..710469c1151f5 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationImpl.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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CapabilityInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.SubscriptionState; +import java.util.UUID; + +class CapabilityInformationImpl extends WrapperImpl implements CapabilityInformation { + private final DataLakeAnalyticsManager manager; + CapabilityInformationImpl(CapabilityInformationInner inner, DataLakeAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public Integer accountCount() { + return this.inner().accountCount(); + } + + @Override + public Integer maxAccountCount() { + return this.inner().maxAccountCount(); + } + + @Override + public Boolean migrationState() { + return this.inner().migrationState(); + } + + @Override + public SubscriptionState state() { + return this.inner().state(); + } + + @Override + public UUID subscriptionId() { + return this.inner().subscriptionId(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationInner.java new file mode 100644 index 0000000000000..e2cc9639b1f34 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/CapabilityInformationInner.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.management.datalakeanalytics.v2016_11_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.SubscriptionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subscription-level properties and limits for Data Lake Analytics. + */ +public class CapabilityInformationInner { + /** + * The subscription credentials that uniquely identifies the subscription. + */ + @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private UUID subscriptionId; + + /** + * The subscription state. Possible values include: 'Registered', + * 'Suspended', 'Deleted', 'Unregistered', 'Warned'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private SubscriptionState state; + + /** + * The maximum supported number of accounts under this subscription. + */ + @JsonProperty(value = "maxAccountCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxAccountCount; + + /** + * The current number of accounts under this subscription. + */ + @JsonProperty(value = "accountCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer accountCount; + + /** + * The Boolean value of true or false to indicate the maintenance state. + */ + @JsonProperty(value = "migrationState", access = JsonProperty.Access.WRITE_ONLY) + private Boolean migrationState; + + /** + * Get the subscription credentials that uniquely identifies the subscription. + * + * @return the subscriptionId value + */ + public UUID subscriptionId() { + return this.subscriptionId; + } + + /** + * Get the subscription state. Possible values include: 'Registered', 'Suspended', 'Deleted', 'Unregistered', 'Warned'. + * + * @return the state value + */ + public SubscriptionState state() { + return this.state; + } + + /** + * Get the maximum supported number of accounts under this subscription. + * + * @return the maxAccountCount value + */ + public Integer maxAccountCount() { + return this.maxAccountCount; + } + + /** + * Get the current number of accounts under this subscription. + * + * @return the accountCount value + */ + public Integer accountCount() { + return this.accountCount; + } + + /** + * Get the Boolean value of true or false to indicate the maintenance state. + * + * @return the migrationState value + */ + public Boolean migrationState() { + return this.migrationState; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesImpl.java new file mode 100644 index 0000000000000..1c35360a32770 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesImpl.java @@ -0,0 +1,81 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.ComputePolicies; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.ComputePolicy; + +class ComputePoliciesImpl extends WrapperImpl implements ComputePolicies { + private final DataLakeAnalyticsManager manager; + + ComputePoliciesImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().computePolicies()); + this.manager = manager; + } + + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public ComputePolicyImpl define(String name) { + return wrapModel(name); + } + + private ComputePolicyImpl wrapModel(ComputePolicyInner inner) { + return new ComputePolicyImpl(inner, manager()); + } + + private ComputePolicyImpl wrapModel(String name) { + return new ComputePolicyImpl(name, this.manager()); + } + + @Override + public Observable listByAccountAsync(final String resourceGroupName, final String accountName) { + ComputePoliciesInner client = this.inner(); + return client.listByAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ComputePolicy call(ComputePolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String computePolicyName) { + ComputePoliciesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, computePolicyName) + .map(new Func1() { + @Override + public ComputePolicy call(ComputePolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String computePolicyName) { + ComputePoliciesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, computePolicyName).toCompletable(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java new file mode 100644 index 0000000000000..ae9cac62d5cfc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java @@ -0,0 +1,799 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateOrUpdateComputePolicyParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateComputePolicyParameters; +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 ComputePolicies. + */ +public class ComputePoliciesInner { + /** The Retrofit service to perform REST calls. */ + private ComputePoliciesService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of ComputePoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ComputePoliciesInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(ComputePoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ComputePolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface ComputePoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2016_11_01.ComputePolicies listByAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies") + Observable> listByAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.ComputePolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("computePolicyName") String computePolicyName, @Body CreateOrUpdateComputePolicyParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.ComputePolicies get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("computePolicyName") String computePolicyName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.ComputePolicies update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("computePolicyName") String computePolicyName, @Body UpdateComputePolicyParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.ComputePolicies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("computePolicyName") String computePolicyName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.ComputePolicies listByAccountNext" }) + @GET + Observable> listByAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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<ComputePolicyInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ComputePolicyInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ComputePolicyInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByAccountSinglePageAsync(resourceGroupName, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ComputePolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountDelegate(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); + } + + /** + * Creates or updates the specified compute policy. During update, the compute policy with the specified name will be replaced with this new compute policy. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to create or update. + * @param parameters Parameters supplied to create or update the compute policy. The max degree of parallelism per job property, min priority per job property, or both must be present. + * @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 ComputePolicyInner object if successful. + */ + public ComputePolicyInner createOrUpdate(String resourceGroupName, String accountName, String computePolicyName, CreateOrUpdateComputePolicyParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified compute policy. During update, the compute policy with the specified name will be replaced with this new compute policy. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to create or update. + * @param parameters Parameters supplied to create or update the compute policy. The max degree of parallelism per job property, min priority per job property, or both must be present. + * @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 createOrUpdateAsync(String resourceGroupName, String accountName, String computePolicyName, CreateOrUpdateComputePolicyParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified compute policy. During update, the compute policy with the specified name will be replaced with this new compute policy. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to create or update. + * @param parameters Parameters supplied to create or update the compute policy. The max degree of parallelism per job property, min priority per job property, or both must be present. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String accountName, String computePolicyName, CreateOrUpdateComputePolicyParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName, parameters).map(new Func1, ComputePolicyInner>() { + @Override + public ComputePolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified compute policy. During update, the compute policy with the specified name will be replaced with this new compute policy. An account supports, at most, 50 policies. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to create or update. + * @param parameters Parameters supplied to create or update the compute policy. The max degree of parallelism per job property, min priority per job property, or both must be present. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String computePolicyName, CreateOrUpdateComputePolicyParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (computePolicyName == null) { + throw new IllegalArgumentException("Parameter computePolicyName 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); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, accountName, computePolicyName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(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 Data Lake Analytics compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy 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 ComputePolicyInner object if successful. + */ + public ComputePolicyInner get(String resourceGroupName, String accountName, String computePolicyName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Analytics compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy 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 getAsync(String resourceGroupName, String accountName, String computePolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName), serviceCallback); + } + + /** + * Gets the specified Data Lake Analytics compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String computePolicyName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName).map(new Func1, ComputePolicyInner>() { + @Override + public ComputePolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Analytics compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String computePolicyName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (computePolicyName == null) { + throw new IllegalArgumentException("Parameter computePolicyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, computePolicyName, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @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 ComputePolicyInner object if successful. + */ + public ComputePolicyInner update(String resourceGroupName, String accountName, String computePolicyName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName).toBlocking().single().body(); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @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 updateAsync(String resourceGroupName, String accountName, String computePolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName), serviceCallback); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String computePolicyName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName).map(new Func1, ComputePolicyInner>() { + @Override + public ComputePolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String computePolicyName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (computePolicyName == null) { + throw new IllegalArgumentException("Parameter computePolicyName 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 UpdateComputePolicyParameters parameters = null; + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, computePolicyName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @param parameters Parameters supplied to update the compute policy. + * @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 ComputePolicyInner object if successful. + */ + public ComputePolicyInner update(String resourceGroupName, String accountName, String computePolicyName, UpdateComputePolicyParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @param parameters Parameters supplied to update the compute policy. + * @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 updateAsync(String resourceGroupName, String accountName, String computePolicyName, UpdateComputePolicyParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName, parameters), serviceCallback); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @param parameters Parameters supplied to update the compute policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String computePolicyName, UpdateComputePolicyParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName, parameters).map(new Func1, ComputePolicyInner>() { + @Override + public ComputePolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified compute policy. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to update. + * @param parameters Parameters supplied to update the compute policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ComputePolicyInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String computePolicyName, UpdateComputePolicyParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (computePolicyName == null) { + throw new IllegalArgumentException("Parameter computePolicyName 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); + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, computePolicyName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(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 compute policy from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy 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 delete(String resourceGroupName, String accountName, String computePolicyName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName).toBlocking().single().body(); + } + + /** + * Deletes the specified compute policy from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy 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 deleteAsync(String resourceGroupName, String accountName, String computePolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName), serviceCallback); + } + + /** + * Deletes the specified compute policy from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String computePolicyName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified compute policy from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param computePolicyName The name of the compute policy to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String computePolicyName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (computePolicyName == null) { + throw new IllegalArgumentException("Parameter computePolicyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, accountName, computePolicyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @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<ComputePolicyInner> object if successful. + */ + public PagedList listByAccountNext(final String nextPageLink) { + ServiceResponse> response = listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @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> listByAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @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<ComputePolicyInner> object + */ + public Observable> listByAccountNextAsync(final String nextPageLink) { + return listByAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + * @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<ComputePolicyInner> object + */ + public Observable>> listByAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByAccountNextSinglePageAsync(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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ComputePolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountNextSinglePageAsync(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.listByAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountNextDelegate(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/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyImpl.java new file mode 100644 index 0000000000000..7aa7bea2919c3 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyImpl.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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.ComputePolicy; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateComputePolicyParameters; +import java.util.UUID; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateOrUpdateComputePolicyParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.AADObjectType; +import rx.functions.Func1; + +class ComputePolicyImpl extends CreatableUpdatableImpl implements ComputePolicy, ComputePolicy.Definition, ComputePolicy.Update { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String computePolicyName; + private CreateOrUpdateComputePolicyParameters createParameter; + private UpdateComputePolicyParameters updateParameter; + + ComputePolicyImpl(String name, DataLakeAnalyticsManager manager) { + super(name, new ComputePolicyInner()); + this.manager = manager; + // Set resource name + this.computePolicyName = name; + // + this.createParameter = new CreateOrUpdateComputePolicyParameters(); + this.updateParameter = new UpdateComputePolicyParameters(); + } + + ComputePolicyImpl(ComputePolicyInner inner, DataLakeAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.computePolicyName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.computePolicyName = IdParsingUtils.getValueFromIdByName(inner.id(), "computePolicies"); + // + this.createParameter = new CreateOrUpdateComputePolicyParameters(); + this.updateParameter = new UpdateComputePolicyParameters(); + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ComputePoliciesInner client = this.manager().inner().computePolicies(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.computePolicyName, this.createParameter) + .map(new Func1() { + @Override + public ComputePolicyInner call(ComputePolicyInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ComputePoliciesInner client = this.manager().inner().computePolicies(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.computePolicyName, this.updateParameter) + .map(new Func1() { + @Override + public ComputePolicyInner call(ComputePolicyInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ComputePoliciesInner client = this.manager().inner().computePolicies(); + return client.getAsync(this.resourceGroupName, this.accountName, this.computePolicyName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new CreateOrUpdateComputePolicyParameters(); + this.updateParameter = new UpdateComputePolicyParameters(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer maxDegreeOfParallelismPerJob() { + return this.inner().maxDegreeOfParallelismPerJob(); + } + + @Override + public Integer minPriorityPerJob() { + return this.inner().minPriorityPerJob(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public UUID objectId() { + return this.inner().objectId(); + } + + @Override + public AADObjectType objectType() { + return this.inner().objectType(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ComputePolicyImpl withExistingAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public ComputePolicyImpl withObjectId(UUID objectId) { + if (isInCreateMode()) { + this.createParameter.withObjectId(objectId); + } else { + this.updateParameter.withObjectId(objectId); + } + return this; + } + + @Override + public ComputePolicyImpl withObjectType(AADObjectType objectType) { + if (isInCreateMode()) { + this.createParameter.withObjectType(objectType); + } else { + this.updateParameter.withObjectType(objectType); + } + return this; + } + + @Override + public ComputePolicyImpl withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + if (isInCreateMode()) { + this.createParameter.withMaxDegreeOfParallelismPerJob(maxDegreeOfParallelismPerJob); + } else { + this.updateParameter.withMaxDegreeOfParallelismPerJob(maxDegreeOfParallelismPerJob); + } + return this; + } + + @Override + public ComputePolicyImpl withMinPriorityPerJob(Integer minPriorityPerJob) { + if (isInCreateMode()) { + this.createParameter.withMinPriorityPerJob(minPriorityPerJob); + } else { + this.updateParameter.withMinPriorityPerJob(minPriorityPerJob); + } + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyInner.java new file mode 100644 index 0000000000000..b978fafcabfe2 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePolicyInner.java @@ -0,0 +1,114 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.AADObjectType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Data Lake Analytics compute policy information. + */ +@JsonFlatten +public class ComputePolicyInner extends SubResource { + /** + * The AAD object identifier for the entity to create a policy for. + */ + @JsonProperty(value = "properties.objectId", access = JsonProperty.Access.WRITE_ONLY) + private UUID objectId; + + /** + * The type of AAD object the object identifier refers to. Possible values + * include: 'User', 'Group', 'ServicePrincipal'. + */ + @JsonProperty(value = "properties.objectType", access = JsonProperty.Access.WRITE_ONLY) + private AADObjectType objectType; + + /** + * The maximum degree of parallelism per job this user can use to submit + * jobs. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum priority per job this user can use to submit jobs. + */ + @JsonProperty(value = "properties.minPriorityPerJob", access = JsonProperty.Access.WRITE_ONLY) + private Integer minPriorityPerJob; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the AAD object identifier for the entity to create a policy for. + * + * @return the objectId value + */ + public UUID objectId() { + return this.objectId; + } + + /** + * Get the type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'. + * + * @return the objectType value + */ + public AADObjectType objectType() { + return this.objectType; + } + + /** + * Get the maximum degree of parallelism per job this user can use to submit jobs. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Get the minimum priority per job this user can use to submit jobs. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountBasicInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountBasicInner.java new file mode 100644 index 0000000000000..97eceba58e33c --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountBasicInner.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.management.datalakeanalytics.v2016_11_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccountStatus; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccountState; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A Data Lake Analytics account object, containing all information associated + * with the named Data Lake Analytics account. + */ +@JsonFlatten +@SkipParentValidation +public class DataLakeAnalyticsAccountBasicInner extends Resource { + /** + * The unique identifier associated with this Data Lake Analytics account. + */ + @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) + private UUID accountId; + + /** + * The provisioning status of the Data Lake Analytics account. Possible + * values include: 'Failed', 'Creating', 'Running', 'Succeeded', + * 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', + * 'Undeleting', 'Canceled'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeAnalyticsAccountStatus provisioningState; + + /** + * The state of the Data Lake Analytics account. Possible values include: + * 'Active', 'Suspended'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeAnalyticsAccountState state; + + /** + * The account creation time. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * The account last modified time. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The full CName endpoint for this account. + */ + @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /** + * Get the unique identifier associated with this Data Lake Analytics account. + * + * @return the accountId value + */ + public UUID accountId() { + return this.accountId; + } + + /** + * Get the provisioning status of the Data Lake Analytics account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled'. + * + * @return the provisioningState value + */ + public DataLakeAnalyticsAccountStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the state of the Data Lake Analytics account. Possible values include: 'Active', 'Suspended'. + * + * @return the state value + */ + public DataLakeAnalyticsAccountState state() { + return this.state; + } + + /** + * Get the account creation time. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get the account last modified time. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the full CName endpoint for this account. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountImpl.java new file mode 100644 index 0000000000000..704fd0b4946fc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountImpl.java @@ -0,0 +1,362 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccount; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateDataLakeAnalyticsAccountParameters; +import java.util.List; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateDataLakeAnalyticsAccountParameters; +import java.util.UUID; +import java.util.ArrayList; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.ComputePolicy; +import org.joda.time.DateTime; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.TierType; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccountInformation; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallAllowAzureIpsState; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallRule; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallState; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccountStatus; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccountState; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageAccountInformation; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.AddDataLakeStoreWithAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateComputePolicyWithAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateFirewallRuleWithAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.AddStorageAccountWithAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateComputePolicyWithAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateDataLakeStoreWithAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateFirewallRuleWithAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateStorageAccountWithAccountParameters; +import rx.functions.Func1; + +class DataLakeAnalyticsAccountImpl extends GroupableResourceCoreImpl implements DataLakeAnalyticsAccount, DataLakeAnalyticsAccount.Definition, DataLakeAnalyticsAccount.Update { + private CreateDataLakeAnalyticsAccountParameters createParameter; + private UpdateDataLakeAnalyticsAccountParameters updateParameter; + DataLakeAnalyticsAccountImpl(String name, DataLakeAnalyticsAccountInner inner, DataLakeAnalyticsManager manager) { + super(name, inner, manager); + this.createParameter = new CreateDataLakeAnalyticsAccountParameters(); + this.updateParameter = new UpdateDataLakeAnalyticsAccountParameters(); + } + + @Override + public Observable createResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + this.createParameter.withLocation(inner().location()); + this.createParameter.withTags(inner().getTags()); + return client.createAsync(this.resourceGroupName(), this.name(), this.createParameter) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccountInner call(DataLakeAnalyticsAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public DataLakeAnalyticsAccountInner call(DataLakeAnalyticsAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new CreateDataLakeAnalyticsAccountParameters(); + this.updateParameter = new UpdateDataLakeAnalyticsAccountParameters(); + } + + @Override + public UUID accountId() { + return this.inner().accountId(); + } + + @Override + public List computePolicies() { + List lst = new ArrayList(); + if (this.inner().computePolicies() != null) { + for (ComputePolicyInner inner : this.inner().computePolicies()) { + lst.add( new ComputePolicyImpl(inner, manager())); + } + } + return lst; + } + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public TierType currentTier() { + return this.inner().currentTier(); + } + + @Override + public List dataLakeStoreAccounts() { + List lst = new ArrayList(); + if (this.inner().dataLakeStoreAccounts() != null) { + for (DataLakeStoreAccountInformationInner inner : this.inner().dataLakeStoreAccounts()) { + lst.add( new DataLakeStoreAccountInformationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String defaultDataLakeStoreAccount() { + return this.inner().defaultDataLakeStoreAccount(); + } + + @Override + public String endpoint() { + return this.inner().endpoint(); + } + + @Override + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.inner().firewallAllowAzureIps(); + } + + @Override + public List firewallRules() { + List lst = new ArrayList(); + if (this.inner().firewallRules() != null) { + for (FirewallRuleInner inner : this.inner().firewallRules()) { + lst.add( new FirewallRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public FirewallState firewallState() { + return this.inner().firewallState(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public Integer maxDegreeOfParallelism() { + return this.inner().maxDegreeOfParallelism(); + } + + @Override + public Integer maxDegreeOfParallelismPerJob() { + return this.inner().maxDegreeOfParallelismPerJob(); + } + + @Override + public Integer maxJobCount() { + return this.inner().maxJobCount(); + } + + @Override + public Integer minPriorityPerJob() { + return this.inner().minPriorityPerJob(); + } + + @Override + public TierType newTier() { + return this.inner().newTier(); + } + + @Override + public DataLakeAnalyticsAccountStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Integer queryStoreRetention() { + return this.inner().queryStoreRetention(); + } + + @Override + public DataLakeAnalyticsAccountState state() { + return this.inner().state(); + } + + @Override + public List storageAccounts() { + List lst = new ArrayList(); + if (this.inner().storageAccounts() != null) { + for (StorageAccountInformationInner inner : this.inner().storageAccounts()) { + lst.add( new StorageAccountInformationImpl(inner, manager())); + } + } + return lst; + } + + @Override + public Integer systemMaxDegreeOfParallelism() { + return this.inner().systemMaxDegreeOfParallelism(); + } + + @Override + public Integer systemMaxJobCount() { + return this.inner().systemMaxJobCount(); + } + + @Override + public DataLakeAnalyticsAccountImpl withDataLakeStoreAccountsForCreate(List dataLakeStoreAccounts) { + this.createParameter.withDataLakeStoreAccounts(dataLakeStoreAccounts); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withDefaultDataLakeStoreAccount(String defaultDataLakeStoreAccount) { + this.createParameter.withDefaultDataLakeStoreAccount(defaultDataLakeStoreAccount); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withComputePoliciesForCreate(List computePolicies) { + this.createParameter.withComputePolicies(computePolicies); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withFirewallRulesForCreate(List firewallRules) { + this.createParameter.withFirewallRules(firewallRules); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withStorageAccountsForCreate(List storageAccounts) { + this.createParameter.withStorageAccounts(storageAccounts); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withComputePoliciesForUpdate(List computePolicies) { + this.updateParameter.withComputePolicies(computePolicies); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withDataLakeStoreAccountsForUpdate(List dataLakeStoreAccounts) { + this.updateParameter.withDataLakeStoreAccounts(dataLakeStoreAccounts); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withFirewallRulesForUpdate(List firewallRules) { + this.updateParameter.withFirewallRules(firewallRules); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withStorageAccountsForUpdate(List storageAccounts) { + this.updateParameter.withStorageAccounts(storageAccounts); + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps) { + if (isInCreateMode()) { + this.createParameter.withFirewallAllowAzureIps(firewallAllowAzureIps); + } else { + this.updateParameter.withFirewallAllowAzureIps(firewallAllowAzureIps); + } + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withFirewallState(FirewallState firewallState) { + if (isInCreateMode()) { + this.createParameter.withFirewallState(firewallState); + } else { + this.updateParameter.withFirewallState(firewallState); + } + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism) { + if (isInCreateMode()) { + this.createParameter.withMaxDegreeOfParallelism(maxDegreeOfParallelism); + } else { + this.updateParameter.withMaxDegreeOfParallelism(maxDegreeOfParallelism); + } + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) { + if (isInCreateMode()) { + this.createParameter.withMaxDegreeOfParallelismPerJob(maxDegreeOfParallelismPerJob); + } else { + this.updateParameter.withMaxDegreeOfParallelismPerJob(maxDegreeOfParallelismPerJob); + } + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withMaxJobCount(Integer maxJobCount) { + if (isInCreateMode()) { + this.createParameter.withMaxJobCount(maxJobCount); + } else { + this.updateParameter.withMaxJobCount(maxJobCount); + } + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withMinPriorityPerJob(Integer minPriorityPerJob) { + if (isInCreateMode()) { + this.createParameter.withMinPriorityPerJob(minPriorityPerJob); + } else { + this.updateParameter.withMinPriorityPerJob(minPriorityPerJob); + } + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withNewTier(TierType newTier) { + if (isInCreateMode()) { + this.createParameter.withNewTier(newTier); + } else { + this.updateParameter.withNewTier(newTier); + } + return this; + } + + @Override + public DataLakeAnalyticsAccountImpl withQueryStoreRetention(Integer queryStoreRetention) { + if (isInCreateMode()) { + this.createParameter.withQueryStoreRetention(queryStoreRetention); + } else { + this.updateParameter.withQueryStoreRetention(queryStoreRetention); + } + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountInner.java new file mode 100644 index 0000000000000..a7fbec4010220 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountInner.java @@ -0,0 +1,381 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccountStatus; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeAnalyticsAccountState; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallState; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallAllowAzureIpsState; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.TierType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A Data Lake Analytics account object, containing all information associated + * with the named Data Lake Analytics account. + */ +@JsonFlatten +@SkipParentValidation +public class DataLakeAnalyticsAccountInner extends Resource { + /** + * The unique identifier associated with this Data Lake Analytics account. + */ + @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) + private UUID accountId; + + /** + * The provisioning status of the Data Lake Analytics account. Possible + * values include: 'Failed', 'Creating', 'Running', 'Succeeded', + * 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', + * 'Undeleting', 'Canceled'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeAnalyticsAccountStatus provisioningState; + + /** + * The state of the Data Lake Analytics account. Possible values include: + * 'Active', 'Suspended'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeAnalyticsAccountState state; + + /** + * The account creation time. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * The account last modified time. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The full CName endpoint for this account. + */ + @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /** + * The default Data Lake Store account associated with this account. + */ + @JsonProperty(value = "properties.defaultDataLakeStoreAccount", access = JsonProperty.Access.WRITE_ONLY) + private String defaultDataLakeStoreAccount; + + /** + * The list of Data Lake Store accounts associated with this account. + */ + @JsonProperty(value = "properties.dataLakeStoreAccounts", access = JsonProperty.Access.WRITE_ONLY) + private List dataLakeStoreAccounts; + + /** + * The list of Azure Blob Storage accounts associated with this account. + */ + @JsonProperty(value = "properties.storageAccounts", access = JsonProperty.Access.WRITE_ONLY) + private List storageAccounts; + + /** + * The list of compute policies associated with this account. + */ + @JsonProperty(value = "properties.computePolicies", access = JsonProperty.Access.WRITE_ONLY) + private List computePolicies; + + /** + * The list of firewall rules associated with this account. + */ + @JsonProperty(value = "properties.firewallRules", access = JsonProperty.Access.WRITE_ONLY) + private List firewallRules; + + /** + * The current state of the IP address firewall for this account. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallState", access = JsonProperty.Access.WRITE_ONLY) + private FirewallState firewallState; + + /** + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallAllowAzureIps", access = JsonProperty.Access.WRITE_ONLY) + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /** + * The commitment tier for the next month. Possible values include: + * 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', + * 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + */ + @JsonProperty(value = "properties.newTier", access = JsonProperty.Access.WRITE_ONLY) + private TierType newTier; + + /** + * The commitment tier in use for the current month. Possible values + * include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', + * 'Commitment_5000AUHours', 'Commitment_10000AUHours', + * 'Commitment_50000AUHours', 'Commitment_100000AUHours', + * 'Commitment_500000AUHours'. + */ + @JsonProperty(value = "properties.currentTier", access = JsonProperty.Access.WRITE_ONLY) + private TierType currentTier; + + /** + * The maximum supported jobs running under the account at the same time. + */ + @JsonProperty(value = "properties.maxJobCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxJobCount; + + /** + * The system defined maximum supported jobs running under the account at + * the same time, which restricts the maximum number of running jobs the + * user can set for the account. + */ + @JsonProperty(value = "properties.systemMaxJobCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer systemMaxJobCount; + + /** + * The maximum supported degree of parallelism for this account. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelism", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxDegreeOfParallelism; + + /** + * The system defined maximum supported degree of parallelism for this + * account, which restricts the maximum value of parallelism the user can + * set for the account. + */ + @JsonProperty(value = "properties.systemMaxDegreeOfParallelism", access = JsonProperty.Access.WRITE_ONLY) + private Integer systemMaxDegreeOfParallelism; + + /** + * The maximum supported degree of parallelism per job for this account. + */ + @JsonProperty(value = "properties.maxDegreeOfParallelismPerJob", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxDegreeOfParallelismPerJob; + + /** + * The minimum supported priority per job for this account. + */ + @JsonProperty(value = "properties.minPriorityPerJob", access = JsonProperty.Access.WRITE_ONLY) + private Integer minPriorityPerJob; + + /** + * The number of days that job metadata is retained. + */ + @JsonProperty(value = "properties.queryStoreRetention", access = JsonProperty.Access.WRITE_ONLY) + private Integer queryStoreRetention; + + /** + * Get the unique identifier associated with this Data Lake Analytics account. + * + * @return the accountId value + */ + public UUID accountId() { + return this.accountId; + } + + /** + * Get the provisioning status of the Data Lake Analytics account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled'. + * + * @return the provisioningState value + */ + public DataLakeAnalyticsAccountStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the state of the Data Lake Analytics account. Possible values include: 'Active', 'Suspended'. + * + * @return the state value + */ + public DataLakeAnalyticsAccountState state() { + return this.state; + } + + /** + * Get the account creation time. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get the account last modified time. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the full CName endpoint for this account. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Get the default Data Lake Store account associated with this account. + * + * @return the defaultDataLakeStoreAccount value + */ + public String defaultDataLakeStoreAccount() { + return this.defaultDataLakeStoreAccount; + } + + /** + * Get the list of Data Lake Store accounts associated with this account. + * + * @return the dataLakeStoreAccounts value + */ + public List dataLakeStoreAccounts() { + return this.dataLakeStoreAccounts; + } + + /** + * Get the list of Azure Blob Storage accounts associated with this account. + * + * @return the storageAccounts value + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Get the list of compute policies associated with this account. + * + * @return the computePolicies value + */ + public List computePolicies() { + return this.computePolicies; + } + + /** + * Get the list of firewall rules associated with this account. + * + * @return the firewallRules value + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Get the current state of the IP address firewall for this account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallState value + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Get the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallAllowAzureIps value + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Get the commitment tier for the next month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + * + * @return the newTier value + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Get the commitment tier in use for the current month. Possible values include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours'. + * + * @return the currentTier value + */ + public TierType currentTier() { + return this.currentTier; + } + + /** + * Get the maximum supported jobs running under the account at the same time. + * + * @return the maxJobCount value + */ + public Integer maxJobCount() { + return this.maxJobCount; + } + + /** + * Get the system defined maximum supported jobs running under the account at the same time, which restricts the maximum number of running jobs the user can set for the account. + * + * @return the systemMaxJobCount value + */ + public Integer systemMaxJobCount() { + return this.systemMaxJobCount; + } + + /** + * Get the maximum supported degree of parallelism for this account. + * + * @return the maxDegreeOfParallelism value + */ + public Integer maxDegreeOfParallelism() { + return this.maxDegreeOfParallelism; + } + + /** + * Get the system defined maximum supported degree of parallelism for this account, which restricts the maximum value of parallelism the user can set for the account. + * + * @return the systemMaxDegreeOfParallelism value + */ + public Integer systemMaxDegreeOfParallelism() { + return this.systemMaxDegreeOfParallelism; + } + + /** + * Get the maximum supported degree of parallelism per job for this account. + * + * @return the maxDegreeOfParallelismPerJob value + */ + public Integer maxDegreeOfParallelismPerJob() { + return this.maxDegreeOfParallelismPerJob; + } + + /** + * Get the minimum supported priority per job for this account. + * + * @return the minPriorityPerJob value + */ + public Integer minPriorityPerJob() { + return this.minPriorityPerJob; + } + + /** + * Get the number of days that job metadata is retained. + * + * @return the queryStoreRetention value + */ + public Integer queryStoreRetention() { + return this.queryStoreRetention; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountManagementClientImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountManagementClientImpl.java new file mode 100644 index 0000000000000..bad48b3065ae6 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountManagementClientImpl.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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataLakeAnalyticsAccountManagementClientImpl class. + */ +public class DataLakeAnalyticsAccountManagementClientImpl extends AzureServiceClient { + /** 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; + } + + /** Get subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Get subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Get subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataLakeAnalyticsAccountManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataLakeAnalyticsAccountManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * 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 DataLakeAnalyticsAccountManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 DataLakeAnalyticsAccountManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The AccountsInner object to access its operations. + */ + private AccountsInner accounts; + + /** + * Gets the AccountsInner object to access its operations. + * @return the AccountsInner object. + */ + public AccountsInner accounts() { + return this.accounts; + } + + /** + * The DataLakeStoreAccountsInner object to access its operations. + */ + private DataLakeStoreAccountsInner dataLakeStoreAccounts; + + /** + * Gets the DataLakeStoreAccountsInner object to access its operations. + * @return the DataLakeStoreAccountsInner object. + */ + public DataLakeStoreAccountsInner dataLakeStoreAccounts() { + return this.dataLakeStoreAccounts; + } + + /** + * The StorageAccountsInner object to access its operations. + */ + private StorageAccountsInner storageAccounts; + + /** + * Gets the StorageAccountsInner object to access its operations. + * @return the StorageAccountsInner object. + */ + public StorageAccountsInner storageAccounts() { + return this.storageAccounts; + } + + /** + * The ComputePoliciesInner object to access its operations. + */ + private ComputePoliciesInner computePolicies; + + /** + * Gets the ComputePoliciesInner object to access its operations. + * @return the ComputePoliciesInner object. + */ + public ComputePoliciesInner computePolicies() { + return this.computePolicies; + } + + /** + * The FirewallRulesInner object to access its operations. + */ + private FirewallRulesInner firewallRules; + + /** + * Gets the FirewallRulesInner object to access its operations. + * @return the FirewallRulesInner object. + */ + public FirewallRulesInner firewallRules() { + return this.firewallRules; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The LocationsInner object to access its operations. + */ + private LocationsInner locations; + + /** + * Gets the LocationsInner object to access its operations. + * @return the LocationsInner object. + */ + public LocationsInner locations() { + return this.locations; + } + + /** + * Initializes an instance of DataLakeAnalyticsAccountManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public DataLakeAnalyticsAccountManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataLakeAnalyticsAccountManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataLakeAnalyticsAccountManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataLakeAnalyticsAccountManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataLakeAnalyticsAccountManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2016-11-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.accounts = new AccountsInner(restClient().retrofit(), this); + this.dataLakeStoreAccounts = new DataLakeStoreAccountsInner(restClient().retrofit(), this); + this.storageAccounts = new StorageAccountsInner(restClient().retrofit(), this); + this.computePolicies = new ComputePoliciesInner(restClient().retrofit(), this); + this.firewallRules = new FirewallRulesInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.locations = new LocationsInner(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, auto-generated)", super.userAgent(), "DataLakeAnalyticsAccountManagementClient", "2016-11-01"); + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsManager.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsManager.java new file mode 100644 index 0000000000000..19e4ef24729e5 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsManager.java @@ -0,0 +1,171 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Accounts; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccounts; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageAccounts; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.ComputePolicies; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallRules; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Operations; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Locations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataLakeAnalytics resource management. + */ +public final class DataLakeAnalyticsManager extends ManagerCore { + private Accounts accounts; + private DataLakeStoreAccounts dataLakeStoreAccounts; + private StorageAccounts storageAccounts; + private ComputePolicies computePolicies; + private FirewallRules firewallRules; + private Operations operations; + private Locations locations; + /** + * Get a Configurable instance that can be used to create DataLakeAnalyticsManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataLakeAnalyticsManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataLakeAnalyticsManager that exposes DataLakeAnalytics resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataLakeAnalyticsManager + */ + public static DataLakeAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataLakeAnalyticsManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataLakeAnalyticsManager that exposes DataLakeAnalytics resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataLakeAnalyticsManager + */ + public static DataLakeAnalyticsManager authenticate(RestClient restClient, String subscriptionId) { + return new DataLakeAnalyticsManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataLakeAnalyticsManager that exposes DataLakeAnalytics management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataLakeAnalytics management API entry points that work across subscriptions + */ + DataLakeAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Accounts. + */ + public Accounts accounts() { + if (this.accounts == null) { + this.accounts = new AccountsImpl(this); + } + return this.accounts; + } + + /** + * @return Entry point to manage DataLakeStoreAccounts. + */ + public DataLakeStoreAccounts dataLakeStoreAccounts() { + if (this.dataLakeStoreAccounts == null) { + this.dataLakeStoreAccounts = new DataLakeStoreAccountsImpl(this); + } + return this.dataLakeStoreAccounts; + } + + /** + * @return Entry point to manage StorageAccounts. + */ + public StorageAccounts storageAccounts() { + if (this.storageAccounts == null) { + this.storageAccounts = new StorageAccountsImpl(this); + } + return this.storageAccounts; + } + + /** + * @return Entry point to manage ComputePolicies. + */ + public ComputePolicies computePolicies() { + if (this.computePolicies == null) { + this.computePolicies = new ComputePoliciesImpl(this); + } + return this.computePolicies; + } + + /** + * @return Entry point to manage FirewallRules. + */ + public FirewallRules firewallRules() { + if (this.firewallRules == null) { + this.firewallRules = new FirewallRulesImpl(this); + } + return this.firewallRules; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Locations. + */ + public Locations locations() { + if (this.locations == null) { + this.locations = new LocationsImpl(this); + } + return this.locations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataLakeAnalyticsManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataLakeAnalyticsManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataLakeAnalyticsManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataLakeAnalyticsAccountManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationImpl.java new file mode 100644 index 0000000000000..2ce21ce7ad912 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationImpl.java @@ -0,0 +1,63 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccountInformation; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class DataLakeStoreAccountInformationImpl extends IndexableRefreshableWrapperImpl implements DataLakeStoreAccountInformation { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String dataLakeStoreAccountName; + + DataLakeStoreAccountInformationImpl(DataLakeStoreAccountInformationInner inner, DataLakeAnalyticsManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.dataLakeStoreAccountName = IdParsingUtils.getValueFromIdByName(inner.id(), "dataLakeStoreAccounts"); + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DataLakeStoreAccountsInner client = this.manager().inner().dataLakeStoreAccounts(); + return client.getAsync(this.resourceGroupName, this.accountName, this.dataLakeStoreAccountName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String suffix() { + return this.inner().suffix(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationInner.java new file mode 100644 index 0000000000000..65231a57fe0d0 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountInformationInner.java @@ -0,0 +1,65 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Data Lake Store account information. + */ +@JsonFlatten +public class DataLakeStoreAccountInformationInner extends SubResource { + /** + * The optional suffix for the Data Lake Store account. + */ + @JsonProperty(value = "properties.suffix", access = JsonProperty.Access.WRITE_ONLY) + private String suffix; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the optional suffix for the Data Lake Store account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsImpl.java new file mode 100644 index 0000000000000..21c1992f4fccf --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsImpl.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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccounts; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccountInformation; + +class DataLakeStoreAccountsImpl extends WrapperImpl implements DataLakeStoreAccounts { + private final DataLakeAnalyticsManager manager; + + DataLakeStoreAccountsImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().dataLakeStoreAccounts()); + this.manager = manager; + } + + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + private DataLakeStoreAccountInformationImpl wrapModel(DataLakeStoreAccountInformationInner inner) { + return new DataLakeStoreAccountInformationImpl(inner, manager()); + } + + @Override + public Observable listByAccountAsync(final String resourceGroupName, final String accountName) { + DataLakeStoreAccountsInner client = this.inner(); + return client.listByAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccountInformation call(DataLakeStoreAccountInformationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + DataLakeStoreAccountsInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, dataLakeStoreAccountName) + .map(new Func1() { + @Override + public DataLakeStoreAccountInformation call(DataLakeStoreAccountInformationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + DataLakeStoreAccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toCompletable(); + } + + @Override + public Completable addAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + DataLakeStoreAccountsInner client = this.inner(); + return client.addAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toCompletable(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsInner.java new file mode 100644 index 0000000000000..0849c22c215df --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeStoreAccountsInner.java @@ -0,0 +1,841 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.AddDataLakeStoreParameters; +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.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 DataLakeStoreAccounts. + */ +public class DataLakeStoreAccountsInner { + /** The Retrofit service to perform REST calls. */ + private DataLakeStoreAccountsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of DataLakeStoreAccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DataLakeStoreAccountsInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(DataLakeStoreAccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DataLakeStoreAccounts to be + * used by Retrofit to perform actually REST calls. + */ + interface DataLakeStoreAccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccounts listByAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts") + Observable> listByAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccounts add" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}") + Observable> add(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("dataLakeStoreAccountName") String dataLakeStoreAccountName, @Body AddDataLakeStoreParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccounts get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("dataLakeStoreAccountName") String dataLakeStoreAccountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("dataLakeStoreAccountName") String dataLakeStoreAccountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.DataLakeStoreAccounts listByAccountNext" }) + @GET + Observable> listByAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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<DataLakeStoreAccountInformationInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInformationInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInformationInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByAccountSinglePageAsync(resourceGroupName, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeStoreAccountInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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 select = null; + final String orderby = null; + final Boolean count = null; + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 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<DataLakeStoreAccountInformationInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName, filter, top, skip, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 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> listByAccountAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName, filter, top, skip, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 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<DataLakeStoreAccountInformationInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName, filter, top, skip, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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 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<DataLakeStoreAccountInformationInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByAccountSinglePageAsync(resourceGroupName, accountName, filter, top, skip, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account. + 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 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<DataLakeStoreAccountInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountDelegate(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); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @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 add(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + addWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @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 addAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName), serviceCallback); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + return addWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> addWithServiceResponseAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (dataLakeStoreAccountName == null) { + throw new IllegalArgumentException("Parameter dataLakeStoreAccountName 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 AddDataLakeStoreParameters parameters = null; + return service.add(this.client.subscriptionId(), resourceGroupName, accountName, dataLakeStoreAccountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @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 add(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { + addWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @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 addAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { + return addWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to add. + * @param parameters The details of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> addWithServiceResponseAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (dataLakeStoreAccountName == null) { + throw new IllegalArgumentException("Parameter dataLakeStoreAccountName 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); + return service.add(this.client.subscriptionId(), resourceGroupName, accountName, dataLakeStoreAccountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(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 Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account 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 DataLakeStoreAccountInformationInner object if successful. + */ + public DataLakeStoreAccountInformationInner get(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account 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 getAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInformationInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).map(new Func1, DataLakeStoreAccountInformationInner>() { + @Override + public DataLakeStoreAccountInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInformationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (dataLakeStoreAccountName == null) { + throw new IllegalArgumentException("Parameter dataLakeStoreAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, dataLakeStoreAccountName, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @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 delete(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @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 deleteAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param dataLakeStoreAccountName The name of the Data Lake Store account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (dataLakeStoreAccountName == null) { + throw new IllegalArgumentException("Parameter dataLakeStoreAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, accountName, dataLakeStoreAccountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(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 first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInformationInner> object if successful. + */ + public PagedList listByAccountNext(final String nextPageLink) { + ServiceResponse> response = listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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> listByAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInformationInner> object + */ + public Observable> listByAccountNextAsync(final String nextPageLink) { + return listByAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInformationInner> object + */ + public Observable>> listByAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByAccountNextSinglePageAsync(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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<DataLakeStoreAccountInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountNextSinglePageAsync(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.listByAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountNextDelegate(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/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleImpl.java new file mode 100644 index 0000000000000..619ac1bb8a883 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleImpl.java @@ -0,0 +1,151 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateFirewallRuleParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateOrUpdateFirewallRuleParameters; +import rx.functions.Func1; + +class FirewallRuleImpl extends CreatableUpdatableImpl implements FirewallRule, FirewallRule.Definition, FirewallRule.Update { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String firewallRuleName; + private CreateOrUpdateFirewallRuleParameters createParameter; + private UpdateFirewallRuleParameters updateParameter; + + FirewallRuleImpl(String name, DataLakeAnalyticsManager manager) { + super(name, new FirewallRuleInner()); + this.manager = manager; + // Set resource name + this.firewallRuleName = name; + // + this.createParameter = new CreateOrUpdateFirewallRuleParameters(); + this.updateParameter = new UpdateFirewallRuleParameters(); + } + + FirewallRuleImpl(FirewallRuleInner inner, DataLakeAnalyticsManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.firewallRuleName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.firewallRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "firewallRules"); + // + this.createParameter = new CreateOrUpdateFirewallRuleParameters(); + this.updateParameter = new UpdateFirewallRuleParameters(); + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + FirewallRulesInner client = this.manager().inner().firewallRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.firewallRuleName, this.createParameter) + .map(new Func1() { + @Override + public FirewallRuleInner call(FirewallRuleInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + FirewallRulesInner client = this.manager().inner().firewallRules(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.firewallRuleName, this.updateParameter) + .map(new Func1() { + @Override + public FirewallRuleInner call(FirewallRuleInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + FirewallRulesInner client = this.manager().inner().firewallRules(); + return client.getAsync(this.resourceGroupName, this.accountName, this.firewallRuleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new CreateOrUpdateFirewallRuleParameters(); + this.updateParameter = new UpdateFirewallRuleParameters(); + } + + @Override + public String endIpAddress() { + return this.inner().endIpAddress(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String startIpAddress() { + return this.inner().startIpAddress(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FirewallRuleImpl withExistingAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public FirewallRuleImpl withEndIpAddress(String endIpAddress) { + if (isInCreateMode()) { + this.createParameter.withEndIpAddress(endIpAddress); + } else { + this.updateParameter.withEndIpAddress(endIpAddress); + } + return this; + } + + @Override + public FirewallRuleImpl withStartIpAddress(String startIpAddress) { + if (isInCreateMode()) { + this.createParameter.withStartIpAddress(startIpAddress); + } else { + this.updateParameter.withStartIpAddress(startIpAddress); + } + return this; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleInner.java new file mode 100644 index 0000000000000..5f8a7e8a9323c --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRuleInner.java @@ -0,0 +1,82 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Data Lake Analytics firewall rule information. + */ +@JsonFlatten +public class FirewallRuleInner extends SubResource { + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String endIpAddress; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesImpl.java new file mode 100644 index 0000000000000..5dd1ee4161276 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesImpl.java @@ -0,0 +1,81 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallRules; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallRule; + +class FirewallRulesImpl extends WrapperImpl implements FirewallRules { + private final DataLakeAnalyticsManager manager; + + FirewallRulesImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().firewallRules()); + this.manager = manager; + } + + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public FirewallRuleImpl define(String name) { + return wrapModel(name); + } + + private FirewallRuleImpl wrapModel(FirewallRuleInner inner) { + return new FirewallRuleImpl(inner, manager()); + } + + private FirewallRuleImpl wrapModel(String name) { + return new FirewallRuleImpl(name, this.manager()); + } + + @Override + public Observable listByAccountAsync(final String resourceGroupName, final String accountName) { + FirewallRulesInner client = this.inner(); + return client.listByAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FirewallRule call(FirewallRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String firewallRuleName) { + FirewallRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, firewallRuleName) + .map(new Func1() { + @Override + public FirewallRule call(FirewallRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String firewallRuleName) { + FirewallRulesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, firewallRuleName).toCompletable(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesInner.java new file mode 100644 index 0000000000000..3287c784cee26 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/FirewallRulesInner.java @@ -0,0 +1,799 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CreateOrUpdateFirewallRuleParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateFirewallRuleParameters; +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 FirewallRules. + */ +public class FirewallRulesInner { + /** The Retrofit service to perform REST calls. */ + private FirewallRulesService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of FirewallRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public FirewallRulesInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(FirewallRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for FirewallRules to be + * used by Retrofit to perform actually REST calls. + */ + interface FirewallRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallRules listByAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules") + Observable> listByAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.FirewallRules createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Body CreateOrUpdateFirewallRuleParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.FirewallRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.FirewallRules update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Body UpdateFirewallRuleParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.FirewallRules delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.FirewallRules listByAccountNext" }) + @GET + Observable> listByAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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<FirewallRuleInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallRuleInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallRuleInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByAccountSinglePageAsync(resourceGroupName, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountDelegate(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); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner createOrUpdate(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @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 createOrUpdateAsync(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName 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); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(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 Data Lake Analytics firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule 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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner get(String resourceGroupName, String accountName, String firewallRuleName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Analytics firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule 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 getAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Gets the specified Data Lake Analytics firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Analytics firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner update(String resourceGroupName, String accountName, String firewallRuleName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @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 updateAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName 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 UpdateFirewallRuleParameters parameters = null; + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner update(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @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 updateAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters), serviceCallback); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName 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); + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(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 firewall rule from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule 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 delete(String resourceGroupName, String accountName, String firewallRuleName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule 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 deleteAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @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<FirewallRuleInner> object if successful. + */ + public PagedList listByAccountNext(final String nextPageLink) { + ServiceResponse> response = listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @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> listByAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @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<FirewallRuleInner> object + */ + public Observable> listByAccountNextAsync(final String nextPageLink) { + return listByAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + * @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<FirewallRuleInner> object + */ + public Observable>> listByAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByAccountNextSinglePageAsync(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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountNextSinglePageAsync(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.listByAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountNextDelegate(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/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/IdParsingUtils.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..d1789487939dc --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsImpl.java new file mode 100644 index 0000000000000..90907983fc380 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsImpl.java @@ -0,0 +1,42 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Locations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.CapabilityInformation; + +class LocationsImpl extends WrapperImpl implements Locations { + private final DataLakeAnalyticsManager manager; + + LocationsImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().locations()); + this.manager = manager; + } + + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable getCapabilityAsync(String location) { + LocationsInner client = this.inner(); + return client.getCapabilityAsync(location) + .map(new Func1() { + @Override + public CapabilityInformation call(CapabilityInformationInner inner) { + return new CapabilityInformationImpl(inner, manager()); + } + }); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsInner.java new file mode 100644 index 0000000000000..87c1961e1be33 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/LocationsInner.java @@ -0,0 +1,140 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Locations. + */ +public class LocationsInner { + /** The Retrofit service to perform REST calls. */ + private LocationsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of LocationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LocationsInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(LocationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Locations to be + * used by Retrofit to perform actually REST calls. + */ + interface LocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Locations getCapability" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/capability") + Observable> getCapability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets subscription-level properties and limits for Data Lake Analytics specified by resource location. + * + * @param location The resource location without whitespace. + * @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 CapabilityInformationInner object if successful. + */ + public CapabilityInformationInner getCapability(String location) { + return getCapabilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Gets subscription-level properties and limits for Data Lake Analytics specified by resource location. + * + * @param location The resource location without whitespace. + * @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 getCapabilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getCapabilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Gets subscription-level properties and limits for Data Lake Analytics specified by resource location. + * + * @param location The resource location without whitespace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CapabilityInformationInner object + */ + public Observable getCapabilityAsync(String location) { + return getCapabilityWithServiceResponseAsync(location).map(new Func1, CapabilityInformationInner>() { + @Override + public CapabilityInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets subscription-level properties and limits for Data Lake Analytics specified by resource location. + * + * @param location The resource location without whitespace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CapabilityInformationInner object + */ + public Observable> getCapabilityWithServiceResponseAsync(String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getCapability(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getCapabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getCapabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationImpl.java new file mode 100644 index 0000000000000..5599641f0d4b7 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationImpl.java @@ -0,0 +1,41 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.NameAvailabilityInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class NameAvailabilityInformationImpl extends WrapperImpl implements NameAvailabilityInformation { + private final DataLakeAnalyticsManager manager; + NameAvailabilityInformationImpl(NameAvailabilityInformationInner inner, DataLakeAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public String reason() { + return this.inner().reason(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationInner.java new file mode 100644 index 0000000000000..f1c36050df2ab --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/NameAvailabilityInformationInner.java @@ -0,0 +1,65 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Analytics account name availability result information. + */ +public class NameAvailabilityInformationInner { + /** + * The Boolean value of true or false to indicate whether the Data Lake + * Analytics account name is available or not. + */ + @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) + private Boolean nameAvailable; + + /** + * The reason why the Data Lake Analytics account name is not available, if + * nameAvailable is false. + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private String reason; + + /** + * The message describing why the Data Lake Analytics account name is not + * available, if nameAvailable is false. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the Boolean value of true or false to indicate whether the Data Lake Analytics account name is available or not. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Get the reason why the Data Lake Analytics account name is not available, if nameAvailable is false. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Get the message describing why the Data Lake Analytics account name is not available, if nameAvailable is false. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationInner.java new file mode 100644 index 0000000000000..7821385166e05 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationInner.java @@ -0,0 +1,65 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.OperationDisplay; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.OperationOrigin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An available operation for Data Lake Analytics. + */ +public class OperationInner { + /** + * The name of the operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The display information for the operation. + */ + @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) + private OperationDisplay display; + + /** + * The intended executor of the operation. Possible values include: 'user', + * 'system', 'user,system'. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private OperationOrigin origin; + + /** + * Get the name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the display information for the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Get the intended executor of the operation. Possible values include: 'user', 'system', 'user,system'. + * + * @return the origin value + */ + public OperationOrigin origin() { + return this.origin; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultImpl.java new file mode 100644 index 0000000000000..74ccafa6f4c3c --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultImpl.java @@ -0,0 +1,37 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.OperationListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class OperationListResultImpl extends WrapperImpl implements OperationListResult { + private final DataLakeAnalyticsManager manager; + OperationListResultImpl(OperationListResultInner inner, DataLakeAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultInner.java new file mode 100644 index 0000000000000..79347dddaac37 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationListResultInner.java @@ -0,0 +1,48 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of available operations for Data Lake Analytics. + */ +public class OperationListResultInner { + /** + * The results of the list operation. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** + * The link (url) to the next page of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the results of the list operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Get the link (url) to the next page of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..cdea4e4d831d8 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsImpl.java @@ -0,0 +1,42 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.OperationListResult; + +class OperationsImpl extends WrapperImpl implements Operations { + private final DataLakeAnalyticsManager manager; + + OperationsImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .map(new Func1() { + @Override + public OperationListResult call(OperationListResultInner inner) { + return new OperationListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsInner.java new file mode 100644 index 0000000000000..2c4209f9066a9 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/OperationsInner.java @@ -0,0 +1,128 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2016_11_01.Operations list" }) + @GET("providers/Microsoft.DataLakeAnalytics/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @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 OperationListResultInner object if successful. + */ + public OperationListResultInner list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @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 ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationListResultInner object + */ + public Observable listAsync() { + return listWithServiceResponseAsync().map(new Func1, OperationListResultInner>() { + @Override + public OperationListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationListResultInner object + */ + public Observable> listWithServiceResponseAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(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); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/PageImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/PageImpl.java new file mode 100644 index 0000000000000..306cacd29b926 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/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.management.datalakeanalytics.v2016_11_01.implementation; + +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/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationImpl.java new file mode 100644 index 0000000000000..ae9847e00947c --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationImpl.java @@ -0,0 +1,31 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.SasTokenInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SasTokenInformationImpl extends WrapperImpl implements SasTokenInformation { + private final DataLakeAnalyticsManager manager; + SasTokenInformationImpl(SasTokenInformationInner inner, DataLakeAnalyticsManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + public String accessToken() { + return this.inner().accessToken(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationInner.java new file mode 100644 index 0000000000000..0db66e7c6411f --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/SasTokenInformationInner.java @@ -0,0 +1,32 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SAS token information. + */ +public class SasTokenInformationInner { + /** + * The access token for the associated Azure Storage Container. + */ + @JsonProperty(value = "accessToken", access = JsonProperty.Access.WRITE_ONLY) + private String accessToken; + + /** + * Get the access token for the associated Azure Storage Container. + * + * @return the accessToken value + */ + public String accessToken() { + return this.accessToken; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationImpl.java new file mode 100644 index 0000000000000..bb11f5b78210d --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationImpl.java @@ -0,0 +1,63 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageAccountInformation; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class StorageAccountInformationImpl extends IndexableRefreshableWrapperImpl implements StorageAccountInformation { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String storageAccountName; + + StorageAccountInformationImpl(StorageAccountInformationInner inner, DataLakeAnalyticsManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.storageAccountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + StorageAccountsInner client = this.manager().inner().storageAccounts(); + return client.getAsync(this.resourceGroupName, this.accountName, this.storageAccountName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String suffix() { + return this.inner().suffix(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationInner.java new file mode 100644 index 0000000000000..3dc34f54f662f --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountInformationInner.java @@ -0,0 +1,65 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Azure Storage account information. + */ +@JsonFlatten +public class StorageAccountInformationInner extends SubResource { + /** + * The optional suffix for the storage account. + */ + @JsonProperty(value = "properties.suffix", access = JsonProperty.Access.WRITE_ONLY) + private String suffix; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the optional suffix for the storage account. + * + * @return the suffix value + */ + public String suffix() { + return this.suffix; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsImpl.java new file mode 100644 index 0000000000000..12559fb43d880 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsImpl.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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageAccounts; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageAccountInformation; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.AddStorageAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageContainer; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.SasTokenInformation; + +class StorageAccountsImpl extends WrapperImpl implements StorageAccounts { + private final DataLakeAnalyticsManager manager; + + StorageAccountsImpl(DataLakeAnalyticsManager manager) { + super(manager.inner().storageAccounts()); + this.manager = manager; + } + + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + private StorageAccountInformationImpl wrapModel(StorageAccountInformationInner inner) { + return new StorageAccountInformationImpl(inner, manager()); + } + + @Override + public Completable updateAsync(String resourceGroupName, String accountName, String storageAccountName) { + StorageAccountsInner client = this.inner(); + return client.updateAsync(resourceGroupName, accountName, storageAccountName).toCompletable(); + } + + @Override + public Observable listByAccountAsync(final String resourceGroupName, final String accountName) { + StorageAccountsInner client = this.inner(); + return client.listByAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageAccountInformation call(StorageAccountInformationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String storageAccountName) { + StorageAccountsInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, storageAccountName) + .map(new Func1() { + @Override + public StorageAccountInformation call(StorageAccountInformationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String storageAccountName) { + StorageAccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, storageAccountName).toCompletable(); + } + + private StorageContainerImpl wrapStorageContainerModel(StorageContainerInner inner) { + return new StorageContainerImpl(inner, manager()); + } + + private Observable getStorageContainerInnerUsingStorageAccountsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String accountName = IdParsingUtils.getValueFromIdByName(id, "accounts"); + String storageAccountName = IdParsingUtils.getValueFromIdByName(id, "storageAccounts"); + String containerName = IdParsingUtils.getValueFromIdByName(id, "containers"); + StorageAccountsInner client = this.inner(); + return client.getStorageContainerAsync(resourceGroupName, accountName, storageAccountName, containerName); + } + + @Override + public Completable addAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + StorageAccountsInner client = this.inner(); + return client.addAsync(resourceGroupName, accountName, storageAccountName, parameters).toCompletable(); + } + + @Override + public Observable getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + StorageAccountsInner client = this.inner(); + return client.getStorageContainerAsync(resourceGroupName, accountName, storageAccountName, containerName) + .map(new Func1() { + @Override + public StorageContainer call(StorageContainerInner inner) { + return wrapStorageContainerModel(inner); + } + }); + } + + @Override + public Observable listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + StorageAccountsInner client = this.inner(); + return client.listStorageContainersAsync(resourceGroupName, accountName, storageAccountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StorageContainer call(StorageContainerInner inner) { + return wrapStorageContainerModel(inner); + } + }); + } + + @Override + public Observable listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + StorageAccountsInner client = this.inner(); + return client.listSasTokensAsync(resourceGroupName, accountName, storageAccountName, containerName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SasTokenInformation call(SasTokenInformationInner inner) { + return new SasTokenInformationImpl(inner, manager()); + } + }); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java new file mode 100644 index 0000000000000..b73dacd69209d --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java @@ -0,0 +1,1560 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.AddStorageAccountParameters; +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.UpdateStorageAccountParameters; +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.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 StorageAccounts. + */ +public class StorageAccountsInner { + /** The Retrofit service to perform REST calls. */ + private StorageAccountsService service; + /** The service client containing this operation class. */ + private DataLakeAnalyticsAccountManagementClientImpl client; + + /** + * Initializes an instance of StorageAccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public StorageAccountsInner(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { + this.service = retrofit.create(StorageAccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for StorageAccounts to be + * used by Retrofit to perform actually REST calls. + */ + interface StorageAccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageAccounts listByAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts") + Observable> listByAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts add" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}") + Observable> add(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Body AddStorageAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Body UpdateStorageAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts listStorageContainers" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers") + Observable> listStorageContainers(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts getStorageContainer" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}") + Observable> getStorageContainer(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("containerName") String containerName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts listSasTokens" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}/listSasTokens") + Observable> listSasTokens(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("storageAccountName") String storageAccountName, @Path("containerName") String containerName, @Query("api-version") String apiVersion, @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.management.datalakeanalytics.v2016_11_01.StorageAccounts listByAccountNext" }) + @GET + Observable> listByAccountNext(@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.management.datalakeanalytics.v2016_11_01.StorageAccounts listStorageContainersNext" }) + @GET + Observable> listStorageContainersNext(@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.management.datalakeanalytics.v2016_11_01.StorageAccounts listSasTokensNext" }) + @GET + Observable> listSasTokensNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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<StorageAccountInformationInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @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> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInformationInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInformationInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByAccountSinglePageAsync(resourceGroupName, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageAccountInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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 select = null; + final String orderby = null; + final Boolean count = null; + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param filter The 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 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<StorageAccountInformationInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName, filter, top, skip, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param filter The 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 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> listByAccountAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName, filter, top, skip, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param filter The 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 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<StorageAccountInformationInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName, filter, top, skip, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param filter The 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 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<StorageAccountInformationInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByAccountSinglePageAsync(resourceGroupName, accountName, filter, top, skip, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account. + ServiceResponse> * @param filter The 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 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<StorageAccountInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountDelegate(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); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @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 add(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + addWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @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 addAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + return addWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to add an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to add + * @param parameters The parameters containing the access key and optional suffix for the Azure Storage Account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> addWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName 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); + return service.add(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(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 Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @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 StorageAccountInformationInner object if successful. + */ + public StorageAccountInformationInner get(String resourceGroupName, String accountName, String storageAccountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single().body(); + } + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @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 resourceGroupName, String accountName, String storageAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName), serviceCallback); + } + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInformationInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String storageAccountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).map(new Func1, StorageAccountInformationInner>() { + @Override + public StorageAccountInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Azure Storage account linked to the given Data Lake Analytics account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account for which to retrieve the details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountInformationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @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 update(String resourceGroupName, String accountName, String storageAccountName) { + updateWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @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 updateAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable updateAsync(String resourceGroupName, String accountName, String storageAccountName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName 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 UpdateStorageAccountParameters parameters = null; + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with, if any. Passing nothing results in no change. + * @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 update(String resourceGroupName, String accountName, String storageAccountName, UpdateStorageAccountParameters parameters) { + updateWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with, if any. Passing nothing results in no change. + * @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 updateAsync(String resourceGroupName, String accountName, String storageAccountName, UpdateStorageAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters), serviceCallback); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with, if any. Passing nothing results in no change. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable updateAsync(String resourceGroupName, String accountName, String storageAccountName, UpdateStorageAccountParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The Azure Storage account to modify + * @param parameters The parameters containing the access key and suffix to update the storage account with, if any. Passing nothing results in no change. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName, UpdateStorageAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName 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); + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(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); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to remove + * @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 delete(String resourceGroupName, String accountName, String storageAccountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to remove + * @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 deleteAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName), serviceCallback); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String storageAccountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Analytics account to remove an Azure Storage account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure Storage account to remove + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(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 Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @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<StorageContainerInner> object if successful. + */ + public PagedList listStorageContainers(final String resourceGroupName, final String accountName, final String storageAccountName) { + ServiceResponse> response = listStorageContainersSinglePageAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @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> listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStorageContainersSinglePageAsync(resourceGroupName, accountName, storageAccountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageContainerInner> object + */ + public Observable> listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + return listStorageContainersWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageContainerInner> object + */ + public Observable>> listStorageContainersWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + return listStorageContainersSinglePageAsync(resourceGroupName, accountName, storageAccountName) + .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(listStorageContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account. + ServiceResponse> * @param storageAccountName The name of the Azure storage account from which to list blob containers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageContainerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStorageContainersSinglePageAsync(final String resourceGroupName, final String accountName, final String storageAccountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStorageContainers(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStorageContainersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStorageContainersDelegate(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 specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container 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 StorageContainerInner object if successful. + */ + public StorageContainerInner getStorageContainer(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + return getStorageContainerWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName).toBlocking().single().body(); + } + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container 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 getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getStorageContainerWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName), serviceCallback); + } + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageContainerInner object + */ + public Observable getStorageContainerAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + return getStorageContainerWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName).map(new Func1, StorageContainerInner>() { + @Override + public StorageContainerInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account from which to retrieve the blob container. + * @param containerName The name of the Azure storage container to retrieve + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageContainerInner object + */ + public Observable> getStorageContainerWithServiceResponseAsync(String resourceGroupName, String accountName, String storageAccountName, String containerName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (containerName == null) { + throw new IllegalArgumentException("Parameter containerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getStorageContainer(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, containerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getStorageContainerDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getStorageContainerDelegate(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 SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @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<SasTokenInformationInner> object if successful. + */ + public PagedList listSasTokens(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + ServiceResponse> response = listSasTokensSinglePageAsync(resourceGroupName, accountName, storageAccountName, containerName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @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> listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSasTokensSinglePageAsync(resourceGroupName, accountName, storageAccountName, containerName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SasTokenInformationInner> object + */ + public Observable> listSasTokensAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + return listSasTokensWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Analytics account. + * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SasTokenInformationInner> object + */ + public Observable>> listSasTokensWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + return listSasTokensSinglePageAsync(resourceGroupName, accountName, storageAccountName, containerName) + .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(listSasTokensNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Analytics account. + ServiceResponse> * @param storageAccountName The name of the Azure storage account for which the SAS token is being requested. + ServiceResponse> * @param containerName The name of the Azure storage container for which the SAS token is being requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SasTokenInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSasTokensSinglePageAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final String containerName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (storageAccountName == null) { + throw new IllegalArgumentException("Parameter storageAccountName is required and cannot be null."); + } + if (containerName == null) { + throw new IllegalArgumentException("Parameter containerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSasTokens(this.client.subscriptionId(), resourceGroupName, accountName, storageAccountName, containerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSasTokensDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSasTokensDelegate(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 first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInformationInner> object if successful. + */ + public PagedList listByAccountNext(final String nextPageLink) { + ServiceResponse> response = listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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> listByAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInformationInner> object + */ + public Observable> listByAccountNextAsync(final String nextPageLink) { + return listByAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInformationInner> object + */ + public Observable>> listByAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByAccountNextSinglePageAsync(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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, 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<StorageAccountInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountNextSinglePageAsync(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.listByAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountNextDelegate(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 Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<StorageContainerInner> object if successful. + */ + public PagedList listStorageContainersNext(final String nextPageLink) { + ServiceResponse> response = listStorageContainersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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> listStorageContainersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStorageContainersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStorageContainersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<StorageContainerInner> object + */ + public Observable> listStorageContainersNextAsync(final String nextPageLink) { + return listStorageContainersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<StorageContainerInner> object + */ + public Observable>> listStorageContainersNextWithServiceResponseAsync(final String nextPageLink) { + return listStorageContainersNextSinglePageAsync(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(listStorageContainersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. 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<StorageContainerInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStorageContainersNextSinglePageAsync(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.listStorageContainersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStorageContainersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStorageContainersNextDelegate(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 SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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<SasTokenInformationInner> object if successful. + */ + public PagedList listSasTokensNext(final String nextPageLink) { + ServiceResponse> response = listSasTokensNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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> listSasTokensNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSasTokensNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSasTokensNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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<SasTokenInformationInner> object + */ + public Observable> listSasTokensNextAsync(final String nextPageLink) { + return listSasTokensNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + * @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<SasTokenInformationInner> object + */ + public Observable>> listSasTokensNextWithServiceResponseAsync(final String nextPageLink) { + return listSasTokensNextSinglePageAsync(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(listSasTokensNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and container combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SasTokenInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSasTokensNextSinglePageAsync(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.listSasTokensNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSasTokensNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSasTokensNextDelegate(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/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerImpl.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerImpl.java new file mode 100644 index 0000000000000..66e515970cb5d --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerImpl.java @@ -0,0 +1,66 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.StorageContainer; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; + +class StorageContainerImpl extends IndexableRefreshableWrapperImpl implements StorageContainer { + private final DataLakeAnalyticsManager manager; + private String resourceGroupName; + private String accountName; + private String storageAccountName; + private String containerName; + + StorageContainerImpl(StorageContainerInner inner, DataLakeAnalyticsManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.storageAccountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts"); + this.containerName = IdParsingUtils.getValueFromIdByName(inner.id(), "containers"); + } + + @Override + public DataLakeAnalyticsManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + StorageAccountsInner client = this.manager().inner().storageAccounts(); + return client.getStorageContainerAsync(this.resourceGroupName, this.accountName, this.storageAccountName, this.containerName); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerInner.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerInner.java new file mode 100644 index 0000000000000..91025f8c4c467 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageContainerInner.java @@ -0,0 +1,66 @@ +/** + * 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.management.datalakeanalytics.v2016_11_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Azure Storage blob container information. + */ +@JsonFlatten +public class StorageContainerInner extends SubResource { + /** + * The last modified time of the blob container. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the last modified time of the blob container. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/package-info.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/package-info.java new file mode 100644 index 0000000000000..bf300b30460b6 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/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 DataLakeAnalyticsAccountManagementClient. + * Creates an Azure Data Lake Analytics account management client. + */ +package com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation; diff --git a/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/package-info.java b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/package-info.java new file mode 100644 index 0000000000000..d5a0904d0eca9 --- /dev/null +++ b/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/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 DataLakeAnalyticsAccountManagementClient. + * Creates an Azure Data Lake Analytics account management client. + */ +package com.microsoft.azure.management.datalakeanalytics.v2016_11_01; diff --git a/datalakestore/resource-manager/v2015_10_01_preview/pom.xml b/datalakestore/resource-manager/v2015_10_01_preview/pom.xml new file mode 100644 index 0000000000000..ecace1c1184bd --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.datalakestore.v2015_10_01_preview + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-datalakestore + 1.0.0-beta-2 + jar + Microsoft Azure SDK for DataLakeStore Management + This package contains Microsoft DataLakeStore Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Accounts.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Accounts.java new file mode 100644 index 0000000000000..490fe2cd38653 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Accounts.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.management.datalakestore.v2015_10_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.implementation.AccountsInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.FirewallRule; + +/** + * Type representing Accounts. + */ +public interface Accounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Begins definition for a new FirewallRule resource. + * @param name resource name. + * @return the first stage of the new FirewallRule definition. + */ + FirewallRule.DefinitionStages.Blank defineFirewallRule(String name); + + /** + * Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to attempt to enable the Key Vault for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable enableKeyVaultAsync(String resourceGroupName, String accountName); + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rule. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName); + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rules. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listFirewallRulesAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to delete the firewall rule. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName); + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/AzureAsyncOperationResult.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/AzureAsyncOperationResult.java new file mode 100644 index 0000000000000..7e3b97319b9e2 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/AzureAsyncOperationResult.java @@ -0,0 +1,55 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The response body contains the status of the specified asynchronous + * operation, indicating whether it has succeeded, is in progress, or has + * failed. Note that this status is distinct from the HTTP status code returned + * for the Get Operation Status operation itself. If the asynchronous operation + * succeeded, the response body includes the HTTP status code for the + * successful request. If the asynchronous operation failed, the response body + * includes the HTTP status code for the failed request and error information + * regarding the failure. + */ +public class AzureAsyncOperationResult { + /** + * the status of the AzureAsuncOperation. Possible values include: + * 'InProgress', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus status; + + /** + * The error property. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private Error error; + + /** + * Get the status of the AzureAsuncOperation. Possible values include: 'InProgress', 'Succeeded', 'Failed'. + * + * @return the status value + */ + public OperationStatus status() { + return this.status; + } + + /** + * Get the error value. + * + * @return the error value + */ + public Error error() { + return this.error; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccount.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccount.java new file mode 100644 index 0000000000000..b51236a9c94fa --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccount.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.management.datalakestore.v2015_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.implementation.DataLakeStoreManager; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.implementation.DataLakeStoreAccountInner; + +/** + * Type representing DataLakeStoreAccount. + */ +public interface DataLakeStoreAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the identity value. + */ + EncryptionIdentity identity(); + + /** + * @return the properties value. + */ + DataLakeStoreAccountProperties properties(); + + /** + * The entirety of the DataLakeStoreAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataLakeStoreAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataLakeStoreAccount definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DataLakeStoreAccount definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The Key vault encryption identity, if any + * @return the next definition stage + */ + WithCreate withIdentity(EncryptionIdentity identity); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties the Data Lake Store account properties + * @return the next definition stage + */ + WithCreate withProperties(DataLakeStoreAccountProperties properties); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithIdentity, DefinitionStages.WithProperties { + } + } + /** + * The template for a DataLakeStoreAccount update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + } + + /** + * Grouping of DataLakeStoreAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the datalakestoreaccount update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The Key vault encryption identity, if any + * @return the next update stage + */ + Update withIdentity(EncryptionIdentity identity); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties the Data Lake Store account properties + * @return the next update stage + */ + Update withProperties(DataLakeStoreAccountProperties properties); + } + + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountProperties.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountProperties.java new file mode 100644 index 0000000000000..107b8b36146bb --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountProperties.java @@ -0,0 +1,203 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store account properties information. + */ +public class DataLakeStoreAccountProperties { + /** + * the status of the Data Lake Store account while being provisioned. + * Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', + * 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountStatus provisioningState; + + /** + * the status of the Data Lake Store account after provisioning has + * completed. Possible values include: 'active', 'suspended'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountState state; + + /** + * the account creation time. + */ + @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * The current state of encryption for this Data Lake store account. + * Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "encryptionState") + private EncryptionState encryptionState; + + /** + * The current state of encryption provisioning for this Data Lake store + * account. Possible values include: 'Creating', 'Succeeded'. + */ + @JsonProperty(value = "encryptionProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionProvisioningState encryptionProvisioningState; + + /** + * The Key vault encryption configuration. + */ + @JsonProperty(value = "encryptionConfig") + private EncryptionConfig encryptionConfig; + + /** + * the account last modified time. + */ + @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * the gateway host. + */ + @JsonProperty(value = "endpoint") + private String endpoint; + + /** + * the default owner group for all new folders and files created in the + * Data Lake Store account. + */ + @JsonProperty(value = "defaultGroup") + private String defaultGroup; + + /** + * Get the status of the Data Lake Store account while being provisioned. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted'. + * + * @return the provisioningState value + */ + public DataLakeStoreAccountStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the status of the Data Lake Store account after provisioning has completed. Possible values include: 'active', 'suspended'. + * + * @return the state value + */ + public DataLakeStoreAccountState state() { + return this.state; + } + + /** + * Get the account creation time. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get the current state of encryption for this Data Lake store account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the encryptionState value + */ + public EncryptionState encryptionState() { + return this.encryptionState; + } + + /** + * Set the current state of encryption for this Data Lake store account. Possible values include: 'Enabled', 'Disabled'. + * + * @param encryptionState the encryptionState value to set + * @return the DataLakeStoreAccountProperties object itself. + */ + public DataLakeStoreAccountProperties withEncryptionState(EncryptionState encryptionState) { + this.encryptionState = encryptionState; + return this; + } + + /** + * Get the current state of encryption provisioning for this Data Lake store account. Possible values include: 'Creating', 'Succeeded'. + * + * @return the encryptionProvisioningState value + */ + public EncryptionProvisioningState encryptionProvisioningState() { + return this.encryptionProvisioningState; + } + + /** + * Get the Key vault encryption configuration. + * + * @return the encryptionConfig value + */ + public EncryptionConfig encryptionConfig() { + return this.encryptionConfig; + } + + /** + * Set the Key vault encryption configuration. + * + * @param encryptionConfig the encryptionConfig value to set + * @return the DataLakeStoreAccountProperties object itself. + */ + public DataLakeStoreAccountProperties withEncryptionConfig(EncryptionConfig encryptionConfig) { + this.encryptionConfig = encryptionConfig; + return this; + } + + /** + * Get the account last modified time. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the gateway host. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the gateway host. + * + * @param endpoint the endpoint value to set + * @return the DataLakeStoreAccountProperties object itself. + */ + public DataLakeStoreAccountProperties withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the default owner group for all new folders and files created in the Data Lake Store account. + * + * @return the defaultGroup value + */ + public String defaultGroup() { + return this.defaultGroup; + } + + /** + * Set the default owner group for all new folders and files created in the Data Lake Store account. + * + * @param defaultGroup the defaultGroup value to set + * @return the DataLakeStoreAccountProperties object itself. + */ + public DataLakeStoreAccountProperties withDefaultGroup(String defaultGroup) { + this.defaultGroup = defaultGroup; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountState.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountState.java new file mode 100644 index 0000000000000..3c3cb3b9fa855 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountState.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeStoreAccountState. + */ +public enum DataLakeStoreAccountState { + /** Enum value active. */ + ACTIVE("active"), + + /** Enum value suspended. */ + SUSPENDED("suspended"); + + /** The actual serialized value for a DataLakeStoreAccountState instance. */ + private String value; + + DataLakeStoreAccountState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeStoreAccountState instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeStoreAccountState object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeStoreAccountState fromString(String value) { + DataLakeStoreAccountState[] items = DataLakeStoreAccountState.values(); + for (DataLakeStoreAccountState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountStatus.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountStatus.java new file mode 100644 index 0000000000000..d59ca09f213a2 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/DataLakeStoreAccountStatus.java @@ -0,0 +1,74 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeStoreAccountStatus. + */ +public enum DataLakeStoreAccountStatus { + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Patching. */ + PATCHING("Patching"), + + /** Enum value Suspending. */ + SUSPENDING("Suspending"), + + /** Enum value Resuming. */ + RESUMING("Resuming"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Deleted. */ + DELETED("Deleted"); + + /** The actual serialized value for a DataLakeStoreAccountStatus instance. */ + private String value; + + DataLakeStoreAccountStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeStoreAccountStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeStoreAccountStatus object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeStoreAccountStatus fromString(String value) { + DataLakeStoreAccountStatus[] items = DataLakeStoreAccountStatus.values(); + for (DataLakeStoreAccountStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfig.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfig.java new file mode 100644 index 0000000000000..8ed6e2ea63411 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfig.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The EncryptionConfig model. + */ +public class EncryptionConfig { + /** + * The type of encryption configuration being used. Currently the only + * supported types are 'UserManaged' and 'ServiceManaged'. Possible values + * include: 'UserManaged', 'ServiceManaged'. + */ + @JsonProperty(value = "type") + private EncryptionConfigType type; + + /** + * The Key vault information for connecting to user managed encryption + * keys. + */ + @JsonProperty(value = "keyVaultMetaInfo") + private KeyVaultMetaInfo keyVaultMetaInfo; + + /** + * Get the type of encryption configuration being used. Currently the only supported types are 'UserManaged' and 'ServiceManaged'. Possible values include: 'UserManaged', 'ServiceManaged'. + * + * @return the type value + */ + public EncryptionConfigType type() { + return this.type; + } + + /** + * Set the type of encryption configuration being used. Currently the only supported types are 'UserManaged' and 'ServiceManaged'. Possible values include: 'UserManaged', 'ServiceManaged'. + * + * @param type the type value to set + * @return the EncryptionConfig object itself. + */ + public EncryptionConfig withType(EncryptionConfigType type) { + this.type = type; + return this; + } + + /** + * Get the Key vault information for connecting to user managed encryption keys. + * + * @return the keyVaultMetaInfo value + */ + public KeyVaultMetaInfo keyVaultMetaInfo() { + return this.keyVaultMetaInfo; + } + + /** + * Set the Key vault information for connecting to user managed encryption keys. + * + * @param keyVaultMetaInfo the keyVaultMetaInfo value to set + * @return the EncryptionConfig object itself. + */ + public EncryptionConfig withKeyVaultMetaInfo(KeyVaultMetaInfo keyVaultMetaInfo) { + this.keyVaultMetaInfo = keyVaultMetaInfo; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfigType.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfigType.java new file mode 100644 index 0000000000000..b8d4f2425f402 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionConfigType.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncryptionConfigType. + */ +public enum EncryptionConfigType { + /** Enum value UserManaged. */ + USER_MANAGED("UserManaged"), + + /** Enum value ServiceManaged. */ + SERVICE_MANAGED("ServiceManaged"); + + /** The actual serialized value for a EncryptionConfigType instance. */ + private String value; + + EncryptionConfigType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionConfigType instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionConfigType object, or null if unable to parse. + */ + @JsonCreator + public static EncryptionConfigType fromString(String value) { + EncryptionConfigType[] items = EncryptionConfigType.values(); + for (EncryptionConfigType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentity.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentity.java new file mode 100644 index 0000000000000..2f04040689b11 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentity.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.management.datalakestore.v2015_10_01_preview; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The EncryptionIdentity model. + */ +public class EncryptionIdentity { + /** + * The type of encryption being used. Currently the only supported type is + * 'SystemAssigned'. Possible values include: 'SystemAssigned'. + */ + @JsonProperty(value = "type") + private EncryptionIdentityType type; + + /** + * The principal identifier associated with the encryption. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /** + * The tenant identifier associated with the encryption. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private UUID tenantId; + + /** + * Get the type of encryption being used. Currently the only supported type is 'SystemAssigned'. Possible values include: 'SystemAssigned'. + * + * @return the type value + */ + public EncryptionIdentityType type() { + return this.type; + } + + /** + * Set the type of encryption being used. Currently the only supported type is 'SystemAssigned'. Possible values include: 'SystemAssigned'. + * + * @param type the type value to set + * @return the EncryptionIdentity object itself. + */ + public EncryptionIdentity withType(EncryptionIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the principal identifier associated with the encryption. + * + * @return the principalId value + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the tenant identifier associated with the encryption. + * + * @return the tenantId value + */ + public UUID tenantId() { + return this.tenantId; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentityType.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentityType.java new file mode 100644 index 0000000000000..36ee7fe8668f1 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionIdentityType.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncryptionIdentityType. + */ +public enum EncryptionIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"); + + /** The actual serialized value for a EncryptionIdentityType instance. */ + private String value; + + EncryptionIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionIdentityType object, or null if unable to parse. + */ + @JsonCreator + public static EncryptionIdentityType fromString(String value) { + EncryptionIdentityType[] items = EncryptionIdentityType.values(); + for (EncryptionIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionProvisioningState.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionProvisioningState.java new file mode 100644 index 0000000000000..56324e2087a60 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionProvisioningState.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncryptionProvisioningState. + */ +public enum EncryptionProvisioningState { + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"); + + /** The actual serialized value for a EncryptionProvisioningState instance. */ + private String value; + + EncryptionProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static EncryptionProvisioningState fromString(String value) { + EncryptionProvisioningState[] items = EncryptionProvisioningState.values(); + for (EncryptionProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionState.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionState.java new file mode 100644 index 0000000000000..0217822e69f1d --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/EncryptionState.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncryptionState. + */ +public enum EncryptionState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a EncryptionState instance. */ + private String value; + + EncryptionState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionState instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionState object, or null if unable to parse. + */ + @JsonCreator + public static EncryptionState fromString(String value) { + EncryptionState[] items = EncryptionState.values(); + for (EncryptionState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Error.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Error.java new file mode 100644 index 0000000000000..c7a125f2160c4 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/Error.java @@ -0,0 +1,93 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store error information. + */ +public class Error { + /** + * the HTTP status code or error code associated with this error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * the error message to display. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * the target of the error. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * the list of error details. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; + + /** + * the inner exceptions or errors, if any. + */ + @JsonProperty(value = "innerError", access = JsonProperty.Access.WRITE_ONLY) + private InnerError innerError; + + /** + * Get the HTTP status code or error code associated with this error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message to display. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the target of the error. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Get the list of error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Get the inner exceptions or errors, if any. + * + * @return the innerError value + */ + public InnerError innerError() { + return this.innerError; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/ErrorDetails.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/ErrorDetails.java new file mode 100644 index 0000000000000..e4e2896f0862e --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/ErrorDetails.java @@ -0,0 +1,63 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store error details information. + */ +public class ErrorDetails { + /** + * the HTTP status code or error code associated with this error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * the error message localized based on Accept-Language. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * the target of the particular error (for example, the name of the + * property in error). + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * Get the HTTP status code or error code associated with this error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message localized based on Accept-Language. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the target of the particular error (for example, the name of the property in error). + * + * @return the target value + */ + public String target() { + return this.target; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRule.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRule.java new file mode 100644 index 0000000000000..efe2158d18e4a --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRule.java @@ -0,0 +1,194 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.implementation.FirewallRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.implementation.DataLakeStoreManager; + +/** + * Type representing FirewallRule. + */ +public interface FirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + FirewallRuleProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the FirewallRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAccount, DefinitionStages.WithCreate { + } + + /** + * Grouping of FirewallRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FirewallRule definition. + */ + interface Blank extends WithAccount { + } + + /** + * The stage of the firewallrule definition allowing to specify Account. + */ + interface WithAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account + * @param accountName The name of the Data Lake Store account to which to add the firewall rule + * @return the next definition stage + */ + WithCreate withExistingAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the firewallrule definition allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id the firewall rule's subscription ID + * @return the next definition stage + */ + WithCreate withId(String id); + } + + /** + * The stage of the firewallrule definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location the firewall rule's regional location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the firewallrule definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name the firewall rule's name + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the firewallrule definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties the properties of the firewall rule + * @return the next definition stage + */ + WithCreate withProperties(FirewallRuleProperties properties); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithId, DefinitionStages.WithLocation, DefinitionStages.WithName, DefinitionStages.WithProperties { + } + } + /** + * The template for a FirewallRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithLocation, UpdateStages.WithName, UpdateStages.WithProperties { + } + + /** + * Grouping of FirewallRule update stages. + */ + interface UpdateStages { + /** + * The stage of the firewallrule update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id the firewall rule's subscription ID + * @return the next update stage + */ + Update withId(String id); + } + + /** + * The stage of the firewallrule update allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location the firewall rule's regional location + * @return the next update stage + */ + Update withLocation(String location); + } + + /** + * The stage of the firewallrule update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name the firewall rule's name + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the firewallrule update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties the properties of the firewall rule + * @return the next update stage + */ + Update withProperties(FirewallRuleProperties properties); + } + + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRuleProperties.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRuleProperties.java new file mode 100644 index 0000000000000..5c86589cb0b03 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/FirewallRuleProperties.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store firewall rule properties information. + */ +public class FirewallRuleProperties { + /** + * the start IP address for the firewall rule. + */ + @JsonProperty(value = "startIpAddress") + private String startIpAddress; + + /** + * the end IP address for the firewall rule. + */ + @JsonProperty(value = "endIpAddress") + private String endIpAddress; + + /** + * Get the start IP address for the firewall rule. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. + * + * @param startIpAddress the startIpAddress value to set + * @return the FirewallRuleProperties object itself. + */ + public FirewallRuleProperties withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. + * + * @param endIpAddress the endIpAddress value to set + * @return the FirewallRuleProperties object itself. + */ + public FirewallRuleProperties withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/InnerError.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/InnerError.java new file mode 100644 index 0000000000000..a7fb2e30a9f50 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/InnerError.java @@ -0,0 +1,47 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store inner error information. + */ +public class InnerError { + /** + * the stack trace for the error. + */ + @JsonProperty(value = "trace", access = JsonProperty.Access.WRITE_ONLY) + private String trace; + + /** + * the context for the error message. + */ + @JsonProperty(value = "context", access = JsonProperty.Access.WRITE_ONLY) + private String context; + + /** + * Get the stack trace for the error. + * + * @return the trace value + */ + public String trace() { + return this.trace; + } + + /** + * Get the context for the error message. + * + * @return the context value + */ + public String context() { + return this.context; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/KeyVaultMetaInfo.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/KeyVaultMetaInfo.java new file mode 100644 index 0000000000000..764760ab76008 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/KeyVaultMetaInfo.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The KeyVaultMetaInfo model. + */ +public class KeyVaultMetaInfo { + /** + * The resource identifier for the user managed Key Vault being used to + * encrypt. + */ + @JsonProperty(value = "keyVaultResourceId") + private String keyVaultResourceId; + + /** + * The name of the user managed encryption key. + */ + @JsonProperty(value = "encryptionKeyName") + private String encryptionKeyName; + + /** + * The version of the user managed encryption key. + */ + @JsonProperty(value = "encryptionKeyVersion") + private String encryptionKeyVersion; + + /** + * Get the resource identifier for the user managed Key Vault being used to encrypt. + * + * @return the keyVaultResourceId value + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the resource identifier for the user managed Key Vault being used to encrypt. + * + * @param keyVaultResourceId the keyVaultResourceId value to set + * @return the KeyVaultMetaInfo object itself. + */ + public KeyVaultMetaInfo withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Get the name of the user managed encryption key. + * + * @return the encryptionKeyName value + */ + public String encryptionKeyName() { + return this.encryptionKeyName; + } + + /** + * Set the name of the user managed encryption key. + * + * @param encryptionKeyName the encryptionKeyName value to set + * @return the KeyVaultMetaInfo object itself. + */ + public KeyVaultMetaInfo withEncryptionKeyName(String encryptionKeyName) { + this.encryptionKeyName = encryptionKeyName; + return this; + } + + /** + * Get the version of the user managed encryption key. + * + * @return the encryptionKeyVersion value + */ + public String encryptionKeyVersion() { + return this.encryptionKeyVersion; + } + + /** + * Set the version of the user managed encryption key. + * + * @param encryptionKeyVersion the encryptionKeyVersion value to set + * @return the KeyVaultMetaInfo object itself. + */ + public KeyVaultMetaInfo withEncryptionKeyVersion(String encryptionKeyVersion) { + this.encryptionKeyVersion = encryptionKeyVersion; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/OperationStatus.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/OperationStatus.java new file mode 100644 index 0000000000000..895bb10852f2e --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/OperationStatus.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.management.datalakestore.v2015_10_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for OperationStatus. + */ +public enum OperationStatus { + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a OperationStatus instance. */ + private String value; + + OperationStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a OperationStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed OperationStatus object, or null if unable to parse. + */ + @JsonCreator + public static OperationStatus fromString(String value) { + OperationStatus[] items = OperationStatus.values(); + for (OperationStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsImpl.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsImpl.java new file mode 100644 index 0000000000000..9adfeca64f21c --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsImpl.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. + * def + */ + +package com.microsoft.azure.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.Accounts; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.DataLakeStoreAccount; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.FirewallRule; + +class AccountsImpl extends GroupableResourcesCoreImpl implements Accounts { + protected AccountsImpl(DataLakeStoreManager manager) { + super(manager.inner().accounts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + AccountsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AccountsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccount call(DataLakeStoreAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + AccountsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + AccountsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccount call(DataLakeStoreAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DataLakeStoreAccountImpl define(String name) { + return wrapModel(name); + } + + @Override + public Completable enableKeyVaultAsync(String resourceGroupName, String accountName) { + AccountsInner client = this.inner(); + return client.enableKeyVaultAsync(resourceGroupName, accountName).toCompletable(); + } + + @Override + protected DataLakeStoreAccountImpl wrapModel(DataLakeStoreAccountInner inner) { + return new DataLakeStoreAccountImpl(inner.name(), inner, manager()); + } + + @Override + protected DataLakeStoreAccountImpl wrapModel(String name) { + return new DataLakeStoreAccountImpl(name, new DataLakeStoreAccountInner(), this.manager()); + } + + @Override + public FirewallRuleImpl defineFirewallRule(String name) { + return wrapFirewallRuleModel(name); + } + + private FirewallRuleImpl wrapFirewallRuleModel(String name) { + return new FirewallRuleImpl(name, this.manager()); + } + + private FirewallRuleImpl wrapFirewallRuleModel(FirewallRuleInner inner) { + return new FirewallRuleImpl(inner, manager()); + } + + private Observable getFirewallRuleInnerUsingAccountsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String accountName = IdParsingUtils.getValueFromIdByName(id, "accounts"); + String firewallRuleName = IdParsingUtils.getValueFromIdByName(id, "firewallRules"); + AccountsInner client = this.inner(); + return client.getFirewallRuleAsync(resourceGroupName, accountName, firewallRuleName); + } + + @Override + public Observable getFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName) { + AccountsInner client = this.inner(); + return client.getFirewallRuleAsync(resourceGroupName, accountName, firewallRuleName) + .map(new Func1() { + @Override + public FirewallRule call(FirewallRuleInner inner) { + return wrapFirewallRuleModel(inner); + } + }); + } + + @Override + public Observable listFirewallRulesAsync(final String resourceGroupName, final String accountName) { + AccountsInner client = this.inner(); + return client.listFirewallRulesAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FirewallRule call(FirewallRuleInner inner) { + return wrapFirewallRuleModel(inner); + } + }); + } + + @Override + public Completable deleteFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName) { + AccountsInner client = this.inner(); + return client.deleteFirewallRuleAsync(resourceGroupName, accountName, firewallRuleName).toCompletable(); + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java new file mode 100644 index 0000000000000..d89f4d353db12 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java @@ -0,0 +1,2091 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +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.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 Accounts. + */ +public class AccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private AccountsService service; + /** The service client containing this operation class. */ + private DataLakeStoreAccountManagementClientImpl client; + + /** + * Initializes an instance of AccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AccountsInner(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { + this.service = retrofit.create(AccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Accounts to be + * used by Retrofit to perform actually REST calls. + */ + interface AccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2015_10_01_preview.Accounts deleteFirewallRule" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}", method = "DELETE", hasBody = true) + Observable> deleteFirewallRule(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts getFirewallRule" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}") + Observable> getFirewallRule(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts listFirewallRules" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules") + Observable> listFirewallRules(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts createOrUpdateFirewallRule" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{name}") + Observable> createOrUpdateFirewallRule(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body FirewallRuleInner parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeStoreAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeStoreAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeStoreAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DataLakeStoreAccountInner parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts enableKeyVault" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/enableKeyVault") + Observable> enableKeyVault(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @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.management.datalakestore.v2015_10_01_preview.Accounts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2015_10_01_preview.Accounts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts") + Observable> list(@Path("subscriptionId") String subscriptionId, @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("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2015_10_01_preview.Accounts listFirewallRulesNext" }) + @GET + Observable> listFirewallRulesNext(@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.management.datalakestore.v2015_10_01_preview.Accounts listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@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.management.datalakestore.v2015_10_01_preview.Accounts listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to delete the firewall rule. + * @param firewallRuleName The name of the firewall rule 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 deleteFirewallRule(String resourceGroupName, String accountName, String firewallRuleName) { + deleteFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to delete the firewall rule. + * @param firewallRuleName The name of the firewall rule 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 deleteFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to delete the firewall rule. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return deleteFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to delete the firewall rule. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteFirewallRuleWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteFirewallRule(resourceGroupName, accountName, firewallRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteFirewallRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteFirewallRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rule. + * @param firewallRuleName The name of the firewall rule 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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner getFirewallRule(String resourceGroupName, String accountName, String firewallRuleName) { + return getFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rule. + * @param firewallRuleName The name of the firewall rule 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 getFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rule. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable getFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return getFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rule. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> getFirewallRuleWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getFirewallRule(resourceGroupName, accountName, firewallRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFirewallRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFirewallRuleDelegate(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 Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rules. + * @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<FirewallRuleInner> object if successful. + */ + public PagedList listFirewallRules(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listFirewallRulesSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listFirewallRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rules. + * @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> listFirewallRulesAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listFirewallRulesSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listFirewallRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rules. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallRuleInner> object + */ + public Observable> listFirewallRulesAsync(final String resourceGroupName, final String accountName) { + return listFirewallRulesWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account from which to get the firewall rules. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallRuleInner> object + */ + public Observable>> listFirewallRulesWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listFirewallRulesSinglePageAsync(resourceGroupName, 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(listFirewallRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + ServiceResponse> * @param accountName The name of the Data Lake Store account from which to get the firewall rules. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listFirewallRulesSinglePageAsync(final String resourceGroupName, final String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFirewallRules(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listFirewallRulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listFirewallRulesDelegate(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); + } + + /** + * Creates or updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to which to add the firewall rule. + * @param name The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create the create firewall rule. + * @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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner createOrUpdateFirewallRule(String resourceGroupName, String accountName, String name, FirewallRuleInner parameters) { + return createOrUpdateFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, name, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to which to add the firewall rule. + * @param name The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create the create firewall rule. + * @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 createOrUpdateFirewallRuleAsync(String resourceGroupName, String accountName, String name, FirewallRuleInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, name, parameters), serviceCallback); + } + + /** + * Creates or updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to which to add the firewall rule. + * @param name The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create the create firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable createOrUpdateFirewallRuleAsync(String resourceGroupName, String accountName, String name, FirewallRuleInner parameters) { + return createOrUpdateFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, name, parameters).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to which to add the firewall rule. + * @param name The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create the create firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> createOrUpdateFirewallRuleWithServiceResponseAsync(String resourceGroupName, String accountName, String name, FirewallRuleInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.createOrUpdateFirewallRule(resourceGroupName, accountName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateFirewallRuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateFirewallRuleDelegate(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); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner create(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 resourceGroupName, String name, DataLakeStoreAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + Observable> observable = service.create(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner beginCreate(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 beginCreateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to create. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.beginCreate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner update(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 updateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + Observable> observable = service.update(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner beginUpdate(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 beginUpdateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param name The name of the Data Lake Store account to update. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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); + return service.beginUpdate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account 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 delete(String resourceGroupName, String accountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account 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 deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account 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 beginDelete(String resourceGroupName, String accountName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account 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 beginDeleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account 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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account 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 getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(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); + } + + /** + * Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to attempt to enable the Key Vault for. + * @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 enableKeyVault(String resourceGroupName, String accountName) { + enableKeyVaultWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to attempt to enable the Key Vault for. + * @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 enableKeyVaultAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(enableKeyVaultWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to attempt to enable the Key Vault for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable enableKeyVaultAsync(String resourceGroupName, String accountName) { + return enableKeyVaultWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. + * @param accountName The name of the Data Lake Store account to attempt to enable the Key Vault for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> enableKeyVaultWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.enableKeyVault(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = enableKeyVaultDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse enableKeyVaultDelegate(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 Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @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<DataLakeStoreAccountInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeStoreAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @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 A 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 desired 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<DataLakeStoreAccountInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, 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 = listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, expand, select, orderby, count, search, format).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @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 A 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 desired 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> listByResourceGroupAsync(final String resourceGroupName, 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( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, expand, select, orderby, count, search, format), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @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 A 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 desired 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<DataLakeStoreAccountInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, 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 listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, top, skip, expand, select, orderby, count, search, format) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + * @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 A 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 desired 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<DataLakeStoreAccountInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, 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 listByResourceGroupSinglePageAsync(resourceGroupName, 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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account(s). + 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 A 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 desired 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<DataLakeStoreAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, 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 (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(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 Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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<DataLakeStoreAccountInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeStoreAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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; + return service.list(this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), 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 Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 desired 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<DataLakeStoreAccountInner> object if successful. + */ + public PagedList list(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(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 Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 desired 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 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(filter, top, skip, expand, select, orderby, count, search, format), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 desired 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<DataLakeStoreAccountInner> object + */ + public Observable> listAsync(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(filter, top, skip, expand, select, orderby, count, search, format) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 desired 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<DataLakeStoreAccountInner> object + */ + public Observable>> listWithServiceResponseAsync(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(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 Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + 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 desired 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<DataLakeStoreAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), filter, top, skip, expand, select, orderby, count, search, format, this.client.apiVersion(), this.client.acceptLanguage(), 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 Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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<FirewallRuleInner> object if successful. + */ + public PagedList listFirewallRulesNext(final String nextPageLink) { + ServiceResponse> response = listFirewallRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listFirewallRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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> listFirewallRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listFirewallRulesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listFirewallRulesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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<FirewallRuleInner> object + */ + public Observable> listFirewallRulesNextAsync(final String nextPageLink) { + return listFirewallRulesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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<FirewallRuleInner> object + */ + public Observable>> listFirewallRulesNextWithServiceResponseAsync(final String nextPageLink) { + return listFirewallRulesNextSinglePageAsync(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(listFirewallRulesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listFirewallRulesNextSinglePageAsync(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.listFirewallRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listFirewallRulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listFirewallRulesNextDelegate(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 Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountInner> 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 Data Lake Store accounts within the subscription. 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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountInner> 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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountInner> 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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountInner> 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/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountImpl.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountImpl.java new file mode 100644 index 0000000000000..e045001a8eea5 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountImpl.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.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.DataLakeStoreAccount; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.EncryptionIdentity; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.DataLakeStoreAccountProperties; + +class DataLakeStoreAccountImpl extends GroupableResourceCoreImpl implements DataLakeStoreAccount, DataLakeStoreAccount.Definition, DataLakeStoreAccount.Update { + DataLakeStoreAccountImpl(String name, DataLakeStoreAccountInner inner, DataLakeStoreManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.createAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public EncryptionIdentity identity() { + return this.inner().identity(); + } + + @Override + public DataLakeStoreAccountProperties properties() { + return this.inner().properties(); + } + + @Override + public DataLakeStoreAccountImpl withIdentity(EncryptionIdentity identity) { + this.inner().withIdentity(identity); + return this; + } + + @Override + public DataLakeStoreAccountImpl withProperties(DataLakeStoreAccountProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountInner.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountInner.java new file mode 100644 index 0000000000000..583f511c9bd20 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountInner.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.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.Resource; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.EncryptionIdentity; +import java.util.Map; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.DataLakeStoreAccountProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store account information. + */ +public class DataLakeStoreAccountInner extends Resource { + /** + * The Key vault encryption identity, if any. + */ + @JsonProperty(value = "identity") + private EncryptionIdentity identity; + + /** + * the Data Lake Store account properties. + */ + @JsonProperty(value = "properties") + private DataLakeStoreAccountProperties properties; + + /** + * Get the Key vault encryption identity, if any. + * + * @return the identity value + */ + public EncryptionIdentity identity() { + return this.identity; + } + + /** + * Set the Key vault encryption identity, if any. + * + * @param identity the identity value to set + * @return the DataLakeStoreAccountInner object itself. + */ + public DataLakeStoreAccountInner withIdentity(EncryptionIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the Data Lake Store account properties. + * + * @return the properties value + */ + public DataLakeStoreAccountProperties properties() { + return this.properties; + } + + /** + * Set the Data Lake Store account properties. + * + * @param properties the properties value to set + * @return the DataLakeStoreAccountInner object itself. + */ + public DataLakeStoreAccountInner withProperties(DataLakeStoreAccountProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountManagementClientImpl.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountManagementClientImpl.java new file mode 100644 index 0000000000000..b7e83b7cb2c8d --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreAccountManagementClientImpl.java @@ -0,0 +1,196 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataLakeStoreAccountManagementClientImpl class. + */ +public class DataLakeStoreAccountManagementClientImpl extends AzureServiceClient { + /** 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; + } + + /** Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataLakeStoreAccountManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataLakeStoreAccountManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * 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 DataLakeStoreAccountManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 DataLakeStoreAccountManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The AccountsInner object to access its operations. + */ + private AccountsInner accounts; + + /** + * Gets the AccountsInner object to access its operations. + * @return the AccountsInner object. + */ + public AccountsInner accounts() { + return this.accounts; + } + + /** + * Initializes an instance of DataLakeStoreAccountManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public DataLakeStoreAccountManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataLakeStoreAccountManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataLakeStoreAccountManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataLakeStoreAccountManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataLakeStoreAccountManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2015-10-01-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.accounts = new AccountsInner(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, auto-generated)", super.userAgent(), "DataLakeStoreAccountManagementClient", "2015-10-01-preview"); + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreManager.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreManager.java new file mode 100644 index 0000000000000..67eab654b2b2a --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/DataLakeStoreManager.java @@ -0,0 +1,99 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.Accounts; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataLakeStore resource management. + */ +public final class DataLakeStoreManager extends ManagerCore { + private Accounts accounts; + /** + * Get a Configurable instance that can be used to create DataLakeStoreManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataLakeStoreManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataLakeStoreManager that exposes DataLakeStore resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataLakeStoreManager + */ + public static DataLakeStoreManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataLakeStoreManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataLakeStoreManager that exposes DataLakeStore resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataLakeStoreManager + */ + public static DataLakeStoreManager authenticate(RestClient restClient, String subscriptionId) { + return new DataLakeStoreManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataLakeStoreManager that exposes DataLakeStore management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataLakeStore management API entry points that work across subscriptions + */ + DataLakeStoreManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Accounts. + */ + public Accounts accounts() { + if (this.accounts == null) { + this.accounts = new AccountsImpl(this); + } + return this.accounts; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataLakeStoreManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataLakeStoreManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataLakeStoreManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataLakeStoreAccountManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleImpl.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleImpl.java new file mode 100644 index 0000000000000..57b6d88f6ab5f --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleImpl.java @@ -0,0 +1,129 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.FirewallRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.FirewallRuleProperties; + +class FirewallRuleImpl extends CreatableUpdatableImpl implements FirewallRule, FirewallRule.Definition, FirewallRule.Update { + private final DataLakeStoreManager manager; + private String resourceGroupName; + private String accountName; + private String name; + + FirewallRuleImpl(String name, DataLakeStoreManager manager) { + super(name, new FirewallRuleInner()); + this.manager = manager; + // Set resource name + this.name = name; + // + } + + FirewallRuleImpl(FirewallRuleInner inner, DataLakeStoreManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.name = inner.name(); + // resource ancestor names + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "firewallRules"); + // + } + + @Override + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.createOrUpdateFirewallRuleAsync(this.resourceGroupName, this.accountName, this.name, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.createOrUpdateFirewallRuleAsync(this.resourceGroupName, this.accountName, this.name, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.getFirewallRuleAsync(this.resourceGroupName, this.accountName, this.name); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public FirewallRuleProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FirewallRuleImpl withExistingAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public FirewallRuleImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public FirewallRuleImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public FirewallRuleImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public FirewallRuleImpl withProperties(FirewallRuleProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleInner.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleInner.java new file mode 100644 index 0000000000000..42ab0b0b9ef9f --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/FirewallRuleInner.java @@ -0,0 +1,137 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview.implementation; + +import com.microsoft.azure.management.datalakestore.v2015_10_01_preview.FirewallRuleProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store firewall rule information. + */ +public class FirewallRuleInner { + /** + * the firewall rule's name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * the namespace and type of the firewall Rule. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * the firewall rule's subscription ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * the firewall rule's regional location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * the properties of the firewall rule. + */ + @JsonProperty(value = "properties") + private FirewallRuleProperties properties; + + /** + * Get the firewall rule's name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the firewall rule's name. + * + * @param name the name value to set + * @return the FirewallRuleInner object itself. + */ + public FirewallRuleInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the namespace and type of the firewall Rule. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the firewall rule's subscription ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the firewall rule's subscription ID. + * + * @param id the id value to set + * @return the FirewallRuleInner object itself. + */ + public FirewallRuleInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the firewall rule's regional location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the firewall rule's regional location. + * + * @param location the location value to set + * @return the FirewallRuleInner object itself. + */ + public FirewallRuleInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties of the firewall rule. + * + * @return the properties value + */ + public FirewallRuleProperties properties() { + return this.properties; + } + + /** + * Set the properties of the firewall rule. + * + * @param properties the properties value to set + * @return the FirewallRuleInner object itself. + */ + public FirewallRuleInner withProperties(FirewallRuleProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/IdParsingUtils.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..0944110a6ba4c --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.management.datalakestore.v2015_10_01_preview.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/PageImpl.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/PageImpl.java new file mode 100644 index 0000000000000..c0401d7a11158 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/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.management.datalakestore.v2015_10_01_preview.implementation; + +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/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/package-info.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/package-info.java new file mode 100644 index 0000000000000..4b012c7d140e1 --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/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 DataLakeStoreAccountManagementClient. + * DataLake Store Client. + */ +package com.microsoft.azure.management.datalakestore.v2015_10_01_preview.implementation; diff --git a/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/package-info.java b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/package-info.java new file mode 100644 index 0000000000000..ce2beaaf11b6d --- /dev/null +++ b/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/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 DataLakeStoreAccountManagementClient. + * DataLake Store Client. + */ +package com.microsoft.azure.management.datalakestore.v2015_10_01_preview; diff --git a/datalakestore/resource-manager/v2016_11_01/pom.xml b/datalakestore/resource-manager/v2016_11_01/pom.xml new file mode 100644 index 0000000000000..0559ee0457bb9 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.datalakestore.v2016_11_01 + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-datalakestore + 1.0.0-beta-2 + jar + Microsoft Azure SDK for DataLakeStore Management + This package contains Microsoft DataLakeStore Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Accounts.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Accounts.java new file mode 100644 index 0000000000000..27739695d6e19 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Accounts.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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.AccountsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Accounts. + */ +public interface Accounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable enableKeyVaultAsync(String resourceGroupName, String accountName); + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CapabilityInformation.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CapabilityInformation.java new file mode 100644 index 0000000000000..8b0fe242dedf7 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CapabilityInformation.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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.CapabilityInformationInner; +import java.util.UUID; + +/** + * Type representing CapabilityInformation. + */ +public interface CapabilityInformation extends HasInner, HasManager { + /** + * @return the accountCount value. + */ + Integer accountCount(); + + /** + * @return the maxAccountCount value. + */ + Integer maxAccountCount(); + + /** + * @return the migrationState value. + */ + Boolean migrationState(); + + /** + * @return the state value. + */ + SubscriptionState state(); + + /** + * @return the subscriptionId value. + */ + UUID subscriptionId(); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CheckNameAvailabilityParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CheckNameAvailabilityParameters.java new file mode 100644 index 0000000000000..02ac6b936bfee --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CheckNameAvailabilityParameters.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store account name availability check parameters. + */ +public class CheckNameAvailabilityParameters { + /** + * The Data Lake Store name to check availability for. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The resource type. Note: This should not be set by the user, as the + * constant value is Microsoft.DataLakeStore/accounts. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of CheckNameAvailabilityParameters class. + * @param name the Data Lake Store name to check availability for. + */ + public CheckNameAvailabilityParameters() { + type = "Microsoft.DataLakeStore/accounts"; + } + + /** + * Get the Data Lake Store name to check availability for. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the Data Lake Store name to check availability for. + * + * @param name the name value to set + * @return the CheckNameAvailabilityParameters object itself. + */ + public CheckNameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeStore/accounts. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeStore/accounts. + * + * @param type the type value to set + * @return the CheckNameAvailabilityParameters object itself. + */ + public CheckNameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateDataLakeStoreAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateDataLakeStoreAccountParameters.java new file mode 100644 index 0000000000000..4f56303216be9 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateDataLakeStoreAccountParameters.java @@ -0,0 +1,369 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The CreateDataLakeStoreAccountParameters model. + */ +@JsonFlatten +public class CreateDataLakeStoreAccountParameters { + /** + * The resource location. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The Key Vault encryption identity, if any. + */ + @JsonProperty(value = "identity") + private EncryptionIdentity identity; + + /** + * The default owner group for all new folders and files created in the + * Data Lake Store account. + */ + @JsonProperty(value = "properties.defaultGroup") + private String defaultGroup; + + /** + * The Key Vault encryption configuration. + */ + @JsonProperty(value = "properties.encryptionConfig") + private EncryptionConfig encryptionConfig; + + /** + * The current state of encryption for this Data Lake Store account. + * Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.encryptionState") + private EncryptionState encryptionState; + + /** + * The list of firewall rules associated with this Data Lake Store account. + */ + @JsonProperty(value = "properties.firewallRules") + private List firewallRules; + + /** + * The list of virtual network rules associated with this Data Lake Store + * account. + */ + @JsonProperty(value = "properties.virtualNetworkRules") + private List virtualNetworkRules; + + /** + * The current state of the IP address firewall for this Data Lake Store + * account. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallState") + private FirewallState firewallState; + + /** + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallAllowAzureIps") + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /** + * The list of trusted identity providers associated with this Data Lake + * Store account. + */ + @JsonProperty(value = "properties.trustedIdProviders") + private List trustedIdProviders; + + /** + * The current state of the trusted identity provider feature for this Data + * Lake Store account. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.trustedIdProviderState") + private TrustedIdProviderState trustedIdProviderState; + + /** + * The commitment tier to use for next month. Possible values include: + * 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', + * 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + */ + @JsonProperty(value = "properties.newTier") + private TierType newTier; + + /** + * Get the resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the resource location. + * + * @param location the location value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the resource tags. + * + * @param tags the tags value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the Key Vault encryption identity, if any. + * + * @return the identity value + */ + public EncryptionIdentity identity() { + return this.identity; + } + + /** + * Set the Key Vault encryption identity, if any. + * + * @param identity the identity value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withIdentity(EncryptionIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the default owner group for all new folders and files created in the Data Lake Store account. + * + * @return the defaultGroup value + */ + public String defaultGroup() { + return this.defaultGroup; + } + + /** + * Set the default owner group for all new folders and files created in the Data Lake Store account. + * + * @param defaultGroup the defaultGroup value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withDefaultGroup(String defaultGroup) { + this.defaultGroup = defaultGroup; + return this; + } + + /** + * Get the Key Vault encryption configuration. + * + * @return the encryptionConfig value + */ + public EncryptionConfig encryptionConfig() { + return this.encryptionConfig; + } + + /** + * Set the Key Vault encryption configuration. + * + * @param encryptionConfig the encryptionConfig value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withEncryptionConfig(EncryptionConfig encryptionConfig) { + this.encryptionConfig = encryptionConfig; + return this; + } + + /** + * Get the current state of encryption for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the encryptionState value + */ + public EncryptionState encryptionState() { + return this.encryptionState; + } + + /** + * Set the current state of encryption for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @param encryptionState the encryptionState value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withEncryptionState(EncryptionState encryptionState) { + this.encryptionState = encryptionState; + return this; + } + + /** + * Get the list of firewall rules associated with this Data Lake Store account. + * + * @return the firewallRules value + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Set the list of firewall rules associated with this Data Lake Store account. + * + * @param firewallRules the firewallRules value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withFirewallRules(List firewallRules) { + this.firewallRules = firewallRules; + return this; + } + + /** + * Get the list of virtual network rules associated with this Data Lake Store account. + * + * @return the virtualNetworkRules value + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set the list of virtual network rules associated with this Data Lake Store account. + * + * @param virtualNetworkRules the virtualNetworkRules value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withVirtualNetworkRules(List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + + /** + * Get the current state of the IP address firewall for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallState value + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Set the current state of the IP address firewall for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallState the firewallState value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withFirewallState(FirewallState firewallState) { + this.firewallState = firewallState; + return this; + } + + /** + * Get the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallAllowAzureIps value + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Set the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallAllowAzureIps the firewallAllowAzureIps value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps) { + this.firewallAllowAzureIps = firewallAllowAzureIps; + return this; + } + + /** + * Get the list of trusted identity providers associated with this Data Lake Store account. + * + * @return the trustedIdProviders value + */ + public List trustedIdProviders() { + return this.trustedIdProviders; + } + + /** + * Set the list of trusted identity providers associated with this Data Lake Store account. + * + * @param trustedIdProviders the trustedIdProviders value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withTrustedIdProviders(List trustedIdProviders) { + this.trustedIdProviders = trustedIdProviders; + return this; + } + + /** + * Get the current state of the trusted identity provider feature for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the trustedIdProviderState value + */ + public TrustedIdProviderState trustedIdProviderState() { + return this.trustedIdProviderState; + } + + /** + * Set the current state of the trusted identity provider feature for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @param trustedIdProviderState the trustedIdProviderState value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withTrustedIdProviderState(TrustedIdProviderState trustedIdProviderState) { + this.trustedIdProviderState = trustedIdProviderState; + return this; + } + + /** + * Get the commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + * + * @return the newTier value + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Set the commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + * + * @param newTier the newTier value to set + * @return the CreateDataLakeStoreAccountParameters object itself. + */ + public CreateDataLakeStoreAccountParameters withNewTier(TierType newTier) { + this.newTier = newTier; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateFirewallRuleWithAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateFirewallRuleWithAccountParameters.java new file mode 100644 index 0000000000000..298b677b1a903 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateFirewallRuleWithAccountParameters.java @@ -0,0 +1,100 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new firewall rule while creating a new Data + * Lake Store account. + */ +@JsonFlatten +public class CreateFirewallRuleWithAccountParameters { + /** + * The unique name of the firewall rule to create. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress", required = true) + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress", required = true) + private String endIpAddress; + + /** + * Get the unique name of the firewall rule to create. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the firewall rule to create. + * + * @param name the name value to set + * @return the CreateFirewallRuleWithAccountParameters object itself. + */ + public CreateFirewallRuleWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the CreateFirewallRuleWithAccountParameters object itself. + */ + public CreateFirewallRuleWithAccountParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the CreateFirewallRuleWithAccountParameters object itself. + */ + public CreateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateFirewallRuleParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateFirewallRuleParameters.java new file mode 100644 index 0000000000000..e95cc4d6d885e --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateFirewallRuleParameters.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new firewall rule. + */ +@JsonFlatten +public class CreateOrUpdateFirewallRuleParameters { + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress", required = true) + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress", required = true) + private String endIpAddress; + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the CreateOrUpdateFirewallRuleParameters object itself. + */ + public CreateOrUpdateFirewallRuleParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the CreateOrUpdateFirewallRuleParameters object itself. + */ + public CreateOrUpdateFirewallRuleParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateTrustedIdProviderParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateTrustedIdProviderParameters.java new file mode 100644 index 0000000000000..60c84533eeb65 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateTrustedIdProviderParameters.java @@ -0,0 +1,45 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new trusted identity provider. + */ +@JsonFlatten +public class CreateOrUpdateTrustedIdProviderParameters { + /** + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "properties.idProvider", required = true) + private String idProvider; + + /** + * Get the URL of this trusted identity provider. + * + * @return the idProvider value + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Set the URL of this trusted identity provider. + * + * @param idProvider the idProvider value to set + * @return the CreateOrUpdateTrustedIdProviderParameters object itself. + */ + public CreateOrUpdateTrustedIdProviderParameters withIdProvider(String idProvider) { + this.idProvider = idProvider; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateVirtualNetworkRuleParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateVirtualNetworkRuleParameters.java new file mode 100644 index 0000000000000..0a46007cb40cd --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateOrUpdateVirtualNetworkRuleParameters.java @@ -0,0 +1,45 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new virtual network rule. + */ +@JsonFlatten +public class CreateOrUpdateVirtualNetworkRuleParameters { + /** + * The resource identifier for the subnet. + */ + @JsonProperty(value = "properties.subnetId", required = true) + private String subnetId; + + /** + * Get the resource identifier for the subnet. + * + * @return the subnetId value + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the resource identifier for the subnet. + * + * @param subnetId the subnetId value to set + * @return the CreateOrUpdateVirtualNetworkRuleParameters object itself. + */ + public CreateOrUpdateVirtualNetworkRuleParameters withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateTrustedIdProviderWithAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateTrustedIdProviderWithAccountParameters.java new file mode 100644 index 0000000000000..1ba42d3bc8f4e --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateTrustedIdProviderWithAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new trusted identity provider while creating + * a new Data Lake Store account. + */ +@JsonFlatten +public class CreateTrustedIdProviderWithAccountParameters { + /** + * The unique name of the trusted identity provider to create. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "properties.idProvider", required = true) + private String idProvider; + + /** + * Get the unique name of the trusted identity provider to create. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the trusted identity provider to create. + * + * @param name the name value to set + * @return the CreateTrustedIdProviderWithAccountParameters object itself. + */ + public CreateTrustedIdProviderWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the URL of this trusted identity provider. + * + * @return the idProvider value + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Set the URL of this trusted identity provider. + * + * @param idProvider the idProvider value to set + * @return the CreateTrustedIdProviderWithAccountParameters object itself. + */ + public CreateTrustedIdProviderWithAccountParameters withIdProvider(String idProvider) { + this.idProvider = idProvider; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateVirtualNetworkRuleWithAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateVirtualNetworkRuleWithAccountParameters.java new file mode 100644 index 0000000000000..8fd7dc0b40308 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/CreateVirtualNetworkRuleWithAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to create a new virtual network rule while creating a + * new Data Lake Store account. + */ +@JsonFlatten +public class CreateVirtualNetworkRuleWithAccountParameters { + /** + * The unique name of the virtual network rule to create. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The resource identifier for the subnet. + */ + @JsonProperty(value = "properties.subnetId", required = true) + private String subnetId; + + /** + * Get the unique name of the virtual network rule to create. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the virtual network rule to create. + * + * @param name the name value to set + * @return the CreateVirtualNetworkRuleWithAccountParameters object itself. + */ + public CreateVirtualNetworkRuleWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource identifier for the subnet. + * + * @return the subnetId value + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the resource identifier for the subnet. + * + * @param subnetId the subnetId value to set + * @return the CreateVirtualNetworkRuleWithAccountParameters object itself. + */ + public CreateVirtualNetworkRuleWithAccountParameters withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccount.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccount.java new file mode 100644 index 0000000000000..77f24d3c05e8e --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccount.java @@ -0,0 +1,406 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreAccountInner; + +/** + * Type representing DataLakeStoreAccount. + */ +public interface DataLakeStoreAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the accountId value. + */ + UUID accountId(); + + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the currentTier value. + */ + TierType currentTier(); + + /** + * @return the defaultGroup value. + */ + String defaultGroup(); + + /** + * @return the encryptionConfig value. + */ + EncryptionConfig encryptionConfig(); + + /** + * @return the encryptionProvisioningState value. + */ + EncryptionProvisioningState encryptionProvisioningState(); + + /** + * @return the encryptionState value. + */ + EncryptionState encryptionState(); + + /** + * @return the endpoint value. + */ + String endpoint(); + + /** + * @return the firewallAllowAzureIps value. + */ + FirewallAllowAzureIpsState firewallAllowAzureIps(); + + /** + * @return the firewallRules value. + */ + List firewallRules(); + + /** + * @return the firewallState value. + */ + FirewallState firewallState(); + + /** + * @return the identity value. + */ + EncryptionIdentity identity(); + + /** + * @return the lastModifiedTime value. + */ + DateTime lastModifiedTime(); + + /** + * @return the newTier value. + */ + TierType newTier(); + + /** + * @return the provisioningState value. + */ + DataLakeStoreAccountStatus provisioningState(); + + /** + * @return the state value. + */ + DataLakeStoreAccountState state(); + + /** + * @return the trustedIdProviders value. + */ + List trustedIdProviders(); + + /** + * @return the trustedIdProviderState value. + */ + TrustedIdProviderState trustedIdProviderState(); + + /** + * @return the virtualNetworkRules value. + */ + List virtualNetworkRules(); + + /** + * The entirety of the DataLakeStoreAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataLakeStoreAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataLakeStoreAccount definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DataLakeStoreAccount definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify DefaultGroup. + */ + interface WithDefaultGroup { + /** + * Specifies defaultGroup. + * @param defaultGroup The default owner group for all new folders and files created in the Data Lake Store account + * @return the next definition stage + */ + WithCreate withDefaultGroup(String defaultGroup); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify EncryptionConfig. + */ + interface WithEncryptionConfig { + /** + * Specifies encryptionConfig. + * @param encryptionConfig The Key Vault encryption configuration + * @return the next definition stage + */ + WithCreate withEncryptionConfig(EncryptionConfig encryptionConfig); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify EncryptionState. + */ + interface WithEncryptionState { + /** + * Specifies encryptionState. + * @param encryptionState The current state of encryption for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withEncryptionState(EncryptionState encryptionState); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify FirewallAllowAzureIps. + */ + interface WithFirewallAllowAzureIps { + /** + * Specifies firewallAllowAzureIps. + * @param firewallAllowAzureIps The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify FirewallRules. + */ + interface WithFirewallRules { + /** + * Specifies firewallRules. + * @param firewallRules The list of firewall rules associated with this Data Lake Store account + * @return the next definition stage + */ + WithCreate withFirewallRulesForCreate(List firewallRules); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify FirewallState. + */ + interface WithFirewallState { + /** + * Specifies firewallState. + * @param firewallState The current state of the IP address firewall for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withFirewallState(FirewallState firewallState); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The Key Vault encryption identity, if any + * @return the next definition stage + */ + WithCreate withIdentity(EncryptionIdentity identity); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify NewTier. + */ + interface WithNewTier { + /** + * Specifies newTier. + * @param newTier The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB' + * @return the next definition stage + */ + WithCreate withNewTier(TierType newTier); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify TrustedIdProviders. + */ + interface WithTrustedIdProviders { + /** + * Specifies trustedIdProviders. + * @param trustedIdProviders The list of trusted identity providers associated with this Data Lake Store account + * @return the next definition stage + */ + WithCreate withTrustedIdProvidersForCreate(List trustedIdProviders); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify TrustedIdProviderState. + */ + interface WithTrustedIdProviderState { + /** + * Specifies trustedIdProviderState. + * @param trustedIdProviderState The current state of the trusted identity provider feature for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withTrustedIdProviderState(TrustedIdProviderState trustedIdProviderState); + } + + /** + * The stage of the datalakestoreaccount definition allowing to specify VirtualNetworkRules. + */ + interface WithVirtualNetworkRules { + /** + * Specifies virtualNetworkRules. + * @param virtualNetworkRules The list of virtual network rules associated with this Data Lake Store account + * @return the next definition stage + */ + WithCreate withVirtualNetworkRulesForCreate(List virtualNetworkRules); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithDefaultGroup, DefinitionStages.WithEncryptionConfig, DefinitionStages.WithEncryptionState, DefinitionStages.WithFirewallAllowAzureIps, DefinitionStages.WithFirewallRules, DefinitionStages.WithFirewallState, DefinitionStages.WithIdentity, DefinitionStages.WithNewTier, DefinitionStages.WithTrustedIdProviders, DefinitionStages.WithTrustedIdProviderState, DefinitionStages.WithVirtualNetworkRules { + } + } + /** + * The template for a DataLakeStoreAccount update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDefaultGroup, UpdateStages.WithEncryptionConfig, UpdateStages.WithFirewallAllowAzureIps, UpdateStages.WithFirewallRules, UpdateStages.WithFirewallState, UpdateStages.WithNewTier, UpdateStages.WithTrustedIdProviders, UpdateStages.WithTrustedIdProviderState, UpdateStages.WithVirtualNetworkRules { + } + + /** + * Grouping of DataLakeStoreAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the datalakestoreaccount update allowing to specify DefaultGroup. + */ + interface WithDefaultGroup { + /** + * Specifies defaultGroup. + * @param defaultGroup The default owner group for all new folders and files created in the Data Lake Store account + * @return the next update stage + */ + Update withDefaultGroup(String defaultGroup); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify EncryptionConfig. + */ + interface WithEncryptionConfig { + /** + * Specifies encryptionConfig. + * @param encryptionConfig Used for rotation of user managed Key Vault keys. Can only be used to rotate a user managed encryption Key Vault key + * @return the next update stage + */ + Update withEncryptionConfig(UpdateEncryptionConfig encryptionConfig); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify FirewallAllowAzureIps. + */ + interface WithFirewallAllowAzureIps { + /** + * Specifies firewallAllowAzureIps. + * @param firewallAllowAzureIps The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify FirewallRules. + */ + interface WithFirewallRules { + /** + * Specifies firewallRules. + * @param firewallRules The list of firewall rules associated with this Data Lake Store account + * @return the next update stage + */ + Update withFirewallRulesForUpdate(List firewallRules); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify FirewallState. + */ + interface WithFirewallState { + /** + * Specifies firewallState. + * @param firewallState The current state of the IP address firewall for this Data Lake Store account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withFirewallState(FirewallState firewallState); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify NewTier. + */ + interface WithNewTier { + /** + * Specifies newTier. + * @param newTier The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB' + * @return the next update stage + */ + Update withNewTier(TierType newTier); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify TrustedIdProviders. + */ + interface WithTrustedIdProviders { + /** + * Specifies trustedIdProviders. + * @param trustedIdProviders The list of trusted identity providers associated with this Data Lake Store account + * @return the next update stage + */ + Update withTrustedIdProvidersForUpdate(List trustedIdProviders); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify TrustedIdProviderState. + */ + interface WithTrustedIdProviderState { + /** + * Specifies trustedIdProviderState. + * @param trustedIdProviderState The current state of the trusted identity provider feature for this Data Lake Store account. Disabling trusted identity provider functionality does not remove the providers, they will just be ignored until this feature is re-enabled. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withTrustedIdProviderState(TrustedIdProviderState trustedIdProviderState); + } + + /** + * The stage of the datalakestoreaccount update allowing to specify VirtualNetworkRules. + */ + interface WithVirtualNetworkRules { + /** + * Specifies virtualNetworkRules. + * @param virtualNetworkRules The list of virtual network rules associated with this Data Lake Store account + * @return the next update stage + */ + Update withVirtualNetworkRulesForUpdate(List virtualNetworkRules); + } + + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountState.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountState.java new file mode 100644 index 0000000000000..54e3b76b89baa --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountState.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeStoreAccountState. + */ +public enum DataLakeStoreAccountState { + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Suspended. */ + SUSPENDED("Suspended"); + + /** The actual serialized value for a DataLakeStoreAccountState instance. */ + private String value; + + DataLakeStoreAccountState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeStoreAccountState instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeStoreAccountState object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeStoreAccountState fromString(String value) { + DataLakeStoreAccountState[] items = DataLakeStoreAccountState.values(); + for (DataLakeStoreAccountState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountStatus.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountStatus.java new file mode 100644 index 0000000000000..59a426b9afbff --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/DataLakeStoreAccountStatus.java @@ -0,0 +1,80 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataLakeStoreAccountStatus. + */ +public enum DataLakeStoreAccountStatus { + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Patching. */ + PATCHING("Patching"), + + /** Enum value Suspending. */ + SUSPENDING("Suspending"), + + /** Enum value Resuming. */ + RESUMING("Resuming"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Deleted. */ + DELETED("Deleted"), + + /** Enum value Undeleting. */ + UNDELETING("Undeleting"), + + /** Enum value Canceled. */ + CANCELED("Canceled"); + + /** The actual serialized value for a DataLakeStoreAccountStatus instance. */ + private String value; + + DataLakeStoreAccountStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataLakeStoreAccountStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed DataLakeStoreAccountStatus object, or null if unable to parse. + */ + @JsonCreator + public static DataLakeStoreAccountStatus fromString(String value) { + DataLakeStoreAccountStatus[] items = DataLakeStoreAccountStatus.values(); + for (DataLakeStoreAccountStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfig.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfig.java new file mode 100644 index 0000000000000..caae16b10cb89 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfig.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The encryption configuration for the account. + */ +public class EncryptionConfig { + /** + * The type of encryption configuration being used. Currently the only + * supported types are 'UserManaged' and 'ServiceManaged'. Possible values + * include: 'UserManaged', 'ServiceManaged'. + */ + @JsonProperty(value = "type", required = true) + private EncryptionConfigType type; + + /** + * The Key Vault information for connecting to user managed encryption + * keys. + */ + @JsonProperty(value = "keyVaultMetaInfo") + private KeyVaultMetaInfo keyVaultMetaInfo; + + /** + * Get the type of encryption configuration being used. Currently the only supported types are 'UserManaged' and 'ServiceManaged'. Possible values include: 'UserManaged', 'ServiceManaged'. + * + * @return the type value + */ + public EncryptionConfigType type() { + return this.type; + } + + /** + * Set the type of encryption configuration being used. Currently the only supported types are 'UserManaged' and 'ServiceManaged'. Possible values include: 'UserManaged', 'ServiceManaged'. + * + * @param type the type value to set + * @return the EncryptionConfig object itself. + */ + public EncryptionConfig withType(EncryptionConfigType type) { + this.type = type; + return this; + } + + /** + * Get the Key Vault information for connecting to user managed encryption keys. + * + * @return the keyVaultMetaInfo value + */ + public KeyVaultMetaInfo keyVaultMetaInfo() { + return this.keyVaultMetaInfo; + } + + /** + * Set the Key Vault information for connecting to user managed encryption keys. + * + * @param keyVaultMetaInfo the keyVaultMetaInfo value to set + * @return the EncryptionConfig object itself. + */ + public EncryptionConfig withKeyVaultMetaInfo(KeyVaultMetaInfo keyVaultMetaInfo) { + this.keyVaultMetaInfo = keyVaultMetaInfo; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfigType.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfigType.java new file mode 100644 index 0000000000000..898899e541e06 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionConfigType.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncryptionConfigType. + */ +public enum EncryptionConfigType { + /** Enum value UserManaged. */ + USER_MANAGED("UserManaged"), + + /** Enum value ServiceManaged. */ + SERVICE_MANAGED("ServiceManaged"); + + /** The actual serialized value for a EncryptionConfigType instance. */ + private String value; + + EncryptionConfigType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionConfigType instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionConfigType object, or null if unable to parse. + */ + @JsonCreator + public static EncryptionConfigType fromString(String value) { + EncryptionConfigType[] items = EncryptionConfigType.values(); + for (EncryptionConfigType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionIdentity.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionIdentity.java new file mode 100644 index 0000000000000..d413c65ac81ea --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionIdentity.java @@ -0,0 +1,82 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The encryption identity properties. + */ +public class EncryptionIdentity { + /** + * The type of encryption being used. Currently the only supported type is + * 'SystemAssigned'. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * The principal identifier associated with the encryption. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /** + * The tenant identifier associated with the encryption. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private UUID tenantId; + + /** + * Creates an instance of EncryptionIdentity class. + */ + public EncryptionIdentity() { + type = "SystemAssigned"; + } + + /** + * Get the type of encryption being used. Currently the only supported type is 'SystemAssigned'. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of encryption being used. Currently the only supported type is 'SystemAssigned'. + * + * @param type the type value to set + * @return the EncryptionIdentity object itself. + */ + public EncryptionIdentity withType(String type) { + this.type = type; + return this; + } + + /** + * Get the principal identifier associated with the encryption. + * + * @return the principalId value + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the tenant identifier associated with the encryption. + * + * @return the tenantId value + */ + public UUID tenantId() { + return this.tenantId; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionProvisioningState.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionProvisioningState.java new file mode 100644 index 0000000000000..e48eb634848e9 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionProvisioningState.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncryptionProvisioningState. + */ +public enum EncryptionProvisioningState { + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"); + + /** The actual serialized value for a EncryptionProvisioningState instance. */ + private String value; + + EncryptionProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static EncryptionProvisioningState fromString(String value) { + EncryptionProvisioningState[] items = EncryptionProvisioningState.values(); + for (EncryptionProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionState.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionState.java new file mode 100644 index 0000000000000..b8371634c1047 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/EncryptionState.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EncryptionState. + */ +public enum EncryptionState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a EncryptionState instance. */ + private String value; + + EncryptionState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionState instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionState object, or null if unable to parse. + */ + @JsonCreator + public static EncryptionState fromString(String value) { + EncryptionState[] items = EncryptionState.values(); + for (EncryptionState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallAllowAzureIpsState.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallAllowAzureIpsState.java new file mode 100644 index 0000000000000..3a5b934008615 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallAllowAzureIpsState.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FirewallAllowAzureIpsState. + */ +public enum FirewallAllowAzureIpsState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a FirewallAllowAzureIpsState instance. */ + private String value; + + FirewallAllowAzureIpsState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FirewallAllowAzureIpsState instance. + * + * @param value the serialized value to parse. + * @return the parsed FirewallAllowAzureIpsState object, or null if unable to parse. + */ + @JsonCreator + public static FirewallAllowAzureIpsState fromString(String value) { + FirewallAllowAzureIpsState[] items = FirewallAllowAzureIpsState.values(); + for (FirewallAllowAzureIpsState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRule.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRule.java new file mode 100644 index 0000000000000..f0eadb3496a01 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRule.java @@ -0,0 +1,146 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.FirewallRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager; + +/** + * Type representing FirewallRule. + */ +public interface FirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the endIpAddress value. + */ + String endIpAddress(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the startIpAddress value. + */ + String startIpAddress(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the FirewallRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAccount, DefinitionStages.WithEndIpAddress, DefinitionStages.WithStartIpAddress, DefinitionStages.WithCreate { + } + + /** + * Grouping of FirewallRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FirewallRule definition. + */ + interface Blank extends WithAccount { + } + + /** + * The stage of the firewallrule definition allowing to specify Account. + */ + interface WithAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the Azure resource group + * @param accountName The name of the Data Lake Store account + * @return the next definition stage + */ + WithEndIpAddress withExistingAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the firewallrule definition allowing to specify EndIpAddress. + */ + interface WithEndIpAddress { + /** + * Specifies endIpAddress. + * @param endIpAddress The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next definition stage + */ + WithStartIpAddress withEndIpAddress(String endIpAddress); + } + + /** + * The stage of the firewallrule definition allowing to specify StartIpAddress. + */ + interface WithStartIpAddress { + /** + * Specifies startIpAddress. + * @param startIpAddress The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next definition stage + */ + WithCreate withStartIpAddress(String startIpAddress); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a FirewallRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEndIpAddress, UpdateStages.WithStartIpAddress { + } + + /** + * Grouping of FirewallRule update stages. + */ + interface UpdateStages { + /** + * The stage of the firewallrule update allowing to specify EndIpAddress. + */ + interface WithEndIpAddress { + /** + * Specifies endIpAddress. + * @param endIpAddress The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next update stage + */ + Update withEndIpAddress(String endIpAddress); + } + + /** + * The stage of the firewallrule update allowing to specify StartIpAddress. + */ + interface WithStartIpAddress { + /** + * Specifies startIpAddress. + * @param startIpAddress The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol + * @return the next update stage + */ + Update withStartIpAddress(String startIpAddress); + } + + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRules.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRules.java new file mode 100644 index 0000000000000..3fe46455b3a7e --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallRules.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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.FirewallRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing FirewallRules. + */ +public interface FirewallRules extends SupportsCreating, HasInner { + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String firewallRuleName); + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String firewallRuleName); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallState.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallState.java new file mode 100644 index 0000000000000..118ec64825aa9 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/FirewallState.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FirewallState. + */ +public enum FirewallState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a FirewallState instance. */ + private String value; + + FirewallState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FirewallState instance. + * + * @param value the serialized value to parse. + * @return the parsed FirewallState object, or null if unable to parse. + */ + @JsonCreator + public static FirewallState fromString(String value) { + FirewallState[] items = FirewallState.values(); + for (FirewallState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/KeyVaultMetaInfo.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/KeyVaultMetaInfo.java new file mode 100644 index 0000000000000..2784af43301bb --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/KeyVaultMetaInfo.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metadata information used by account encryption. + */ +public class KeyVaultMetaInfo { + /** + * The resource identifier for the user managed Key Vault being used to + * encrypt. + */ + @JsonProperty(value = "keyVaultResourceId", required = true) + private String keyVaultResourceId; + + /** + * The name of the user managed encryption key. + */ + @JsonProperty(value = "encryptionKeyName", required = true) + private String encryptionKeyName; + + /** + * The version of the user managed encryption key. + */ + @JsonProperty(value = "encryptionKeyVersion", required = true) + private String encryptionKeyVersion; + + /** + * Get the resource identifier for the user managed Key Vault being used to encrypt. + * + * @return the keyVaultResourceId value + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the resource identifier for the user managed Key Vault being used to encrypt. + * + * @param keyVaultResourceId the keyVaultResourceId value to set + * @return the KeyVaultMetaInfo object itself. + */ + public KeyVaultMetaInfo withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Get the name of the user managed encryption key. + * + * @return the encryptionKeyName value + */ + public String encryptionKeyName() { + return this.encryptionKeyName; + } + + /** + * Set the name of the user managed encryption key. + * + * @param encryptionKeyName the encryptionKeyName value to set + * @return the KeyVaultMetaInfo object itself. + */ + public KeyVaultMetaInfo withEncryptionKeyName(String encryptionKeyName) { + this.encryptionKeyName = encryptionKeyName; + return this; + } + + /** + * Get the version of the user managed encryption key. + * + * @return the encryptionKeyVersion value + */ + public String encryptionKeyVersion() { + return this.encryptionKeyVersion; + } + + /** + * Set the version of the user managed encryption key. + * + * @param encryptionKeyVersion the encryptionKeyVersion value to set + * @return the KeyVaultMetaInfo object itself. + */ + public KeyVaultMetaInfo withEncryptionKeyVersion(String encryptionKeyVersion) { + this.encryptionKeyVersion = encryptionKeyVersion; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Locations.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Locations.java new file mode 100644 index 0000000000000..ca6174e16063c --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Locations.java @@ -0,0 +1,28 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.LocationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Locations. + */ +public interface Locations extends HasInner { + /** + * Gets subscription-level properties and limits for Data Lake Store specified by resource location. + * + * @param location The resource location without whitespace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getCapabilityAsync(String location); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/NameAvailabilityInformation.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/NameAvailabilityInformation.java new file mode 100644 index 0000000000000..c45028c9afd61 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/NameAvailabilityInformation.java @@ -0,0 +1,35 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.NameAvailabilityInformationInner; + +/** + * Type representing NameAvailabilityInformation. + */ +public interface NameAvailabilityInformation extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + String reason(); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationDisplay.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationDisplay.java new file mode 100644 index 0000000000000..f03b063fce551 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationDisplay.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The display information for a particular operation. + */ +public class OperationDisplay { + /** + * The resource provider of the operation. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * The resource type of the operation. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * A friendly name of the operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * A friendly description of the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the resource provider of the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource type of the operation. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get a friendly name of the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get a friendly description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationListResult.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationListResult.java new file mode 100644 index 0000000000000..f03c3bfd9e432 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationListResult.java @@ -0,0 +1,32 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.OperationListResultInner; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.OperationInner; +import java.util.List; + +/** + * Type representing OperationListResult. + */ +public interface OperationListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationOrigin.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationOrigin.java new file mode 100644 index 0000000000000..2984277be36f9 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/OperationOrigin.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.management.datalakestore.v2016_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OperationOrigin. + */ +public final class OperationOrigin extends ExpandableStringEnum { + /** Static value user for OperationOrigin. */ + public static final OperationOrigin USER = fromString("user"); + + /** Static value system for OperationOrigin. */ + public static final OperationOrigin SYSTEM = fromString("system"); + + /** Static value user,system for OperationOrigin. */ + public static final OperationOrigin USERSYSTEM = fromString("user,system"); + + /** + * Creates or finds a OperationOrigin from its string representation. + * @param name a name to look for + * @return the corresponding OperationOrigin + */ + @JsonCreator + public static OperationOrigin fromString(String name) { + return fromString(name, OperationOrigin.class); + } + + /** + * @return known OperationOrigin values + */ + public static Collection values() { + return values(OperationOrigin.class); + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Operations.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Operations.java new file mode 100644 index 0000000000000..8f0792546af11 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/Operations.java @@ -0,0 +1,27 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available Data Lake Store REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/SubscriptionState.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/SubscriptionState.java new file mode 100644 index 0000000000000..bdfcce79c0bfc --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/SubscriptionState.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.management.datalakestore.v2016_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SubscriptionState. + */ +public final class SubscriptionState extends ExpandableStringEnum { + /** Static value Registered for SubscriptionState. */ + public static final SubscriptionState REGISTERED = fromString("Registered"); + + /** Static value Suspended for SubscriptionState. */ + public static final SubscriptionState SUSPENDED = fromString("Suspended"); + + /** Static value Deleted for SubscriptionState. */ + public static final SubscriptionState DELETED = fromString("Deleted"); + + /** Static value Unregistered for SubscriptionState. */ + public static final SubscriptionState UNREGISTERED = fromString("Unregistered"); + + /** Static value Warned for SubscriptionState. */ + public static final SubscriptionState WARNED = fromString("Warned"); + + /** + * Creates or finds a SubscriptionState from its string representation. + * @param name a name to look for + * @return the corresponding SubscriptionState + */ + @JsonCreator + public static SubscriptionState fromString(String name) { + return fromString(name, SubscriptionState.class); + } + + /** + * @return known SubscriptionState values + */ + public static Collection values() { + return values(SubscriptionState.class); + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TierType.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TierType.java new file mode 100644 index 0000000000000..288d444aa2ace --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TierType.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TierType. + */ +public enum TierType { + /** Enum value Consumption. */ + CONSUMPTION("Consumption"), + + /** Enum value Commitment_1TB. */ + COMMITMENT_1TB("Commitment_1TB"), + + /** Enum value Commitment_10TB. */ + COMMITMENT_10TB("Commitment_10TB"), + + /** Enum value Commitment_100TB. */ + COMMITMENT_100TB("Commitment_100TB"), + + /** Enum value Commitment_500TB. */ + COMMITMENT_500TB("Commitment_500TB"), + + /** Enum value Commitment_1PB. */ + COMMITMENT_1PB("Commitment_1PB"), + + /** Enum value Commitment_5PB. */ + COMMITMENT_5PB("Commitment_5PB"); + + /** The actual serialized value for a TierType instance. */ + private String value; + + TierType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TierType instance. + * + * @param value the serialized value to parse. + * @return the parsed TierType object, or null if unable to parse. + */ + @JsonCreator + public static TierType fromString(String value) { + TierType[] items = TierType.values(); + for (TierType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProvider.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProvider.java new file mode 100644 index 0000000000000..4b0990a6a8c00 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProvider.java @@ -0,0 +1,117 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.TrustedIdProviderInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager; + +/** + * Type representing TrustedIdProvider. + */ +public interface TrustedIdProvider extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the idProvider value. + */ + String idProvider(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the TrustedIdProvider definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAccount, DefinitionStages.WithIdProvider, DefinitionStages.WithCreate { + } + + /** + * Grouping of TrustedIdProvider definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a TrustedIdProvider definition. + */ + interface Blank extends WithAccount { + } + + /** + * The stage of the trustedidprovider definition allowing to specify Account. + */ + interface WithAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the Azure resource group + * @param accountName The name of the Data Lake Store account + * @return the next definition stage + */ + WithIdProvider withExistingAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the trustedidprovider definition allowing to specify IdProvider. + */ + interface WithIdProvider { + /** + * Specifies idProvider. + * @param idProvider The URL of this trusted identity provider + * @return the next definition stage + */ + WithCreate withIdProvider(String idProvider); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a TrustedIdProvider update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithIdProvider { + } + + /** + * Grouping of TrustedIdProvider update stages. + */ + interface UpdateStages { + /** + * The stage of the trustedidprovider update allowing to specify IdProvider. + */ + interface WithIdProvider { + /** + * Specifies idProvider. + * @param idProvider The URL of this trusted identity provider + * @return the next update stage + */ + Update withIdProvider(String idProvider); + } + + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviderState.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviderState.java new file mode 100644 index 0000000000000..8f7eea6646d46 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviderState.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TrustedIdProviderState. + */ +public enum TrustedIdProviderState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a TrustedIdProviderState instance. */ + private String value; + + TrustedIdProviderState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TrustedIdProviderState instance. + * + * @param value the serialized value to parse. + * @return the parsed TrustedIdProviderState object, or null if unable to parse. + */ + @JsonCreator + public static TrustedIdProviderState fromString(String value) { + TrustedIdProviderState[] items = TrustedIdProviderState.values(); + for (TrustedIdProviderState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviders.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviders.java new file mode 100644 index 0000000000000..97d81223ce26a --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/TrustedIdProviders.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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.TrustedIdProvidersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing TrustedIdProviders. + */ +public interface TrustedIdProviders extends SupportsCreating, HasInner { + /** + * Gets the specified Data Lake Store trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String trustedIdProviderName); + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified trusted identity provider from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String trustedIdProviderName); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateDataLakeStoreAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateDataLakeStoreAccountParameters.java new file mode 100644 index 0000000000000..2c625de927049 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateDataLakeStoreAccountParameters.java @@ -0,0 +1,295 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Data Lake Store account information to update. + */ +@JsonFlatten +public class UpdateDataLakeStoreAccountParameters { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The default owner group for all new folders and files created in the + * Data Lake Store account. + */ + @JsonProperty(value = "properties.defaultGroup") + private String defaultGroup; + + /** + * Used for rotation of user managed Key Vault keys. Can only be used to + * rotate a user managed encryption Key Vault key. + */ + @JsonProperty(value = "properties.encryptionConfig") + private UpdateEncryptionConfig encryptionConfig; + + /** + * The list of firewall rules associated with this Data Lake Store account. + */ + @JsonProperty(value = "properties.firewallRules") + private List firewallRules; + + /** + * The list of virtual network rules associated with this Data Lake Store + * account. + */ + @JsonProperty(value = "properties.virtualNetworkRules") + private List virtualNetworkRules; + + /** + * The current state of the IP address firewall for this Data Lake Store + * account. Disabling the firewall does not remove existing rules, they + * will just be ignored until the firewall is re-enabled. Possible values + * include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallState") + private FirewallState firewallState; + + /** + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallAllowAzureIps") + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /** + * The list of trusted identity providers associated with this Data Lake + * Store account. + */ + @JsonProperty(value = "properties.trustedIdProviders") + private List trustedIdProviders; + + /** + * The current state of the trusted identity provider feature for this Data + * Lake Store account. Disabling trusted identity provider functionality + * does not remove the providers, they will just be ignored until this + * feature is re-enabled. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.trustedIdProviderState") + private TrustedIdProviderState trustedIdProviderState; + + /** + * The commitment tier to use for next month. Possible values include: + * 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', + * 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + */ + @JsonProperty(value = "properties.newTier") + private TierType newTier; + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the default owner group for all new folders and files created in the Data Lake Store account. + * + * @return the defaultGroup value + */ + public String defaultGroup() { + return this.defaultGroup; + } + + /** + * Set the default owner group for all new folders and files created in the Data Lake Store account. + * + * @param defaultGroup the defaultGroup value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withDefaultGroup(String defaultGroup) { + this.defaultGroup = defaultGroup; + return this; + } + + /** + * Get used for rotation of user managed Key Vault keys. Can only be used to rotate a user managed encryption Key Vault key. + * + * @return the encryptionConfig value + */ + public UpdateEncryptionConfig encryptionConfig() { + return this.encryptionConfig; + } + + /** + * Set used for rotation of user managed Key Vault keys. Can only be used to rotate a user managed encryption Key Vault key. + * + * @param encryptionConfig the encryptionConfig value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withEncryptionConfig(UpdateEncryptionConfig encryptionConfig) { + this.encryptionConfig = encryptionConfig; + return this; + } + + /** + * Get the list of firewall rules associated with this Data Lake Store account. + * + * @return the firewallRules value + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Set the list of firewall rules associated with this Data Lake Store account. + * + * @param firewallRules the firewallRules value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withFirewallRules(List firewallRules) { + this.firewallRules = firewallRules; + return this; + } + + /** + * Get the list of virtual network rules associated with this Data Lake Store account. + * + * @return the virtualNetworkRules value + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set the list of virtual network rules associated with this Data Lake Store account. + * + * @param virtualNetworkRules the virtualNetworkRules value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withVirtualNetworkRules(List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + + /** + * Get the current state of the IP address firewall for this Data Lake Store account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallState value + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Set the current state of the IP address firewall for this Data Lake Store account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallState the firewallState value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withFirewallState(FirewallState firewallState) { + this.firewallState = firewallState; + return this; + } + + /** + * Get the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallAllowAzureIps value + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Set the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @param firewallAllowAzureIps the firewallAllowAzureIps value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps) { + this.firewallAllowAzureIps = firewallAllowAzureIps; + return this; + } + + /** + * Get the list of trusted identity providers associated with this Data Lake Store account. + * + * @return the trustedIdProviders value + */ + public List trustedIdProviders() { + return this.trustedIdProviders; + } + + /** + * Set the list of trusted identity providers associated with this Data Lake Store account. + * + * @param trustedIdProviders the trustedIdProviders value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withTrustedIdProviders(List trustedIdProviders) { + this.trustedIdProviders = trustedIdProviders; + return this; + } + + /** + * Get the current state of the trusted identity provider feature for this Data Lake Store account. Disabling trusted identity provider functionality does not remove the providers, they will just be ignored until this feature is re-enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @return the trustedIdProviderState value + */ + public TrustedIdProviderState trustedIdProviderState() { + return this.trustedIdProviderState; + } + + /** + * Set the current state of the trusted identity provider feature for this Data Lake Store account. Disabling trusted identity provider functionality does not remove the providers, they will just be ignored until this feature is re-enabled. Possible values include: 'Enabled', 'Disabled'. + * + * @param trustedIdProviderState the trustedIdProviderState value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withTrustedIdProviderState(TrustedIdProviderState trustedIdProviderState) { + this.trustedIdProviderState = trustedIdProviderState; + return this; + } + + /** + * Get the commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + * + * @return the newTier value + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Set the commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + * + * @param newTier the newTier value to set + * @return the UpdateDataLakeStoreAccountParameters object itself. + */ + public UpdateDataLakeStoreAccountParameters withNewTier(TierType newTier) { + this.newTier = newTier; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateEncryptionConfig.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateEncryptionConfig.java new file mode 100644 index 0000000000000..9a779153de101 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateEncryptionConfig.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The encryption configuration used to update a user managed Key Vault key. + */ +public class UpdateEncryptionConfig { + /** + * The updated Key Vault key to use in user managed key rotation. + */ + @JsonProperty(value = "keyVaultMetaInfo") + private UpdateKeyVaultMetaInfo keyVaultMetaInfo; + + /** + * Get the updated Key Vault key to use in user managed key rotation. + * + * @return the keyVaultMetaInfo value + */ + public UpdateKeyVaultMetaInfo keyVaultMetaInfo() { + return this.keyVaultMetaInfo; + } + + /** + * Set the updated Key Vault key to use in user managed key rotation. + * + * @param keyVaultMetaInfo the keyVaultMetaInfo value to set + * @return the UpdateEncryptionConfig object itself. + */ + public UpdateEncryptionConfig withKeyVaultMetaInfo(UpdateKeyVaultMetaInfo keyVaultMetaInfo) { + this.keyVaultMetaInfo = keyVaultMetaInfo; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleParameters.java new file mode 100644 index 0000000000000..85709c6a037b8 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleParameters.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a firewall rule. + */ +@JsonFlatten +public class UpdateFirewallRuleParameters { + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress") + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress") + private String endIpAddress; + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the UpdateFirewallRuleParameters object itself. + */ + public UpdateFirewallRuleParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the UpdateFirewallRuleParameters object itself. + */ + public UpdateFirewallRuleParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java new file mode 100644 index 0000000000000..2a18655d28e0e --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateFirewallRuleWithAccountParameters.java @@ -0,0 +1,100 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a firewall rule while updating a Data Lake + * Store account. + */ +@JsonFlatten +public class UpdateFirewallRuleWithAccountParameters { + /** + * The unique name of the firewall rule to update. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress") + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress") + private String endIpAddress; + + /** + * Get the unique name of the firewall rule to update. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the firewall rule to update. + * + * @param name the name value to set + * @return the UpdateFirewallRuleWithAccountParameters object itself. + */ + public UpdateFirewallRuleWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set + * @return the UpdateFirewallRuleWithAccountParameters object itself. + */ + public UpdateFirewallRuleWithAccountParameters withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set + * @return the UpdateFirewallRuleWithAccountParameters object itself. + */ + public UpdateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateKeyVaultMetaInfo.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateKeyVaultMetaInfo.java new file mode 100644 index 0000000000000..5546d7ff8567b --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateKeyVaultMetaInfo.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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Key Vault update information used for user managed key rotation. + */ +public class UpdateKeyVaultMetaInfo { + /** + * The version of the user managed encryption key to update through a key + * rotation. + */ + @JsonProperty(value = "encryptionKeyVersion") + private String encryptionKeyVersion; + + /** + * Get the version of the user managed encryption key to update through a key rotation. + * + * @return the encryptionKeyVersion value + */ + public String encryptionKeyVersion() { + return this.encryptionKeyVersion; + } + + /** + * Set the version of the user managed encryption key to update through a key rotation. + * + * @param encryptionKeyVersion the encryptionKeyVersion value to set + * @return the UpdateKeyVaultMetaInfo object itself. + */ + public UpdateKeyVaultMetaInfo withEncryptionKeyVersion(String encryptionKeyVersion) { + this.encryptionKeyVersion = encryptionKeyVersion; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderParameters.java new file mode 100644 index 0000000000000..1b64c1e285e71 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderParameters.java @@ -0,0 +1,45 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a trusted identity provider. + */ +@JsonFlatten +public class UpdateTrustedIdProviderParameters { + /** + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "properties.idProvider") + private String idProvider; + + /** + * Get the URL of this trusted identity provider. + * + * @return the idProvider value + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Set the URL of this trusted identity provider. + * + * @param idProvider the idProvider value to set + * @return the UpdateTrustedIdProviderParameters object itself. + */ + public UpdateTrustedIdProviderParameters withIdProvider(String idProvider) { + this.idProvider = idProvider; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderWithAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderWithAccountParameters.java new file mode 100644 index 0000000000000..03d9f8ed15125 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateTrustedIdProviderWithAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a trusted identity provider while updating a + * Data Lake Store account. + */ +@JsonFlatten +public class UpdateTrustedIdProviderWithAccountParameters { + /** + * The unique name of the trusted identity provider to update. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "properties.idProvider") + private String idProvider; + + /** + * Get the unique name of the trusted identity provider to update. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the trusted identity provider to update. + * + * @param name the name value to set + * @return the UpdateTrustedIdProviderWithAccountParameters object itself. + */ + public UpdateTrustedIdProviderWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the URL of this trusted identity provider. + * + * @return the idProvider value + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Set the URL of this trusted identity provider. + * + * @param idProvider the idProvider value to set + * @return the UpdateTrustedIdProviderWithAccountParameters object itself. + */ + public UpdateTrustedIdProviderWithAccountParameters withIdProvider(String idProvider) { + this.idProvider = idProvider; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleParameters.java new file mode 100644 index 0000000000000..ad0c60abaa7d5 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleParameters.java @@ -0,0 +1,45 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a virtual network rule. + */ +@JsonFlatten +public class UpdateVirtualNetworkRuleParameters { + /** + * The resource identifier for the subnet. + */ + @JsonProperty(value = "properties.subnetId") + private String subnetId; + + /** + * Get the resource identifier for the subnet. + * + * @return the subnetId value + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the resource identifier for the subnet. + * + * @param subnetId the subnetId value to set + * @return the UpdateVirtualNetworkRuleParameters object itself. + */ + public UpdateVirtualNetworkRuleParameters withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleWithAccountParameters.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleWithAccountParameters.java new file mode 100644 index 0000000000000..943e41cc82482 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/UpdateVirtualNetworkRuleWithAccountParameters.java @@ -0,0 +1,72 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used to update a virtual network rule while updating a Data + * Lake Store account. + */ +@JsonFlatten +public class UpdateVirtualNetworkRuleWithAccountParameters { + /** + * The unique name of the virtual network rule to update. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The resource identifier for the subnet. + */ + @JsonProperty(value = "properties.subnetId") + private String subnetId; + + /** + * Get the unique name of the virtual network rule to update. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the virtual network rule to update. + * + * @param name the name value to set + * @return the UpdateVirtualNetworkRuleWithAccountParameters object itself. + */ + public UpdateVirtualNetworkRuleWithAccountParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource identifier for the subnet. + * + * @return the subnetId value + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the resource identifier for the subnet. + * + * @param subnetId the subnetId value to set + * @return the UpdateVirtualNetworkRuleWithAccountParameters object itself. + */ + public UpdateVirtualNetworkRuleWithAccountParameters withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRule.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRule.java new file mode 100644 index 0000000000000..25d0ced8c74cd --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRule.java @@ -0,0 +1,117 @@ +/** + * 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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.VirtualNetworkRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager; + +/** + * Type representing VirtualNetworkRule. + */ +public interface VirtualNetworkRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the subnetId value. + */ + String subnetId(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the VirtualNetworkRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAccount, DefinitionStages.WithSubnetId, DefinitionStages.WithCreate { + } + + /** + * Grouping of VirtualNetworkRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VirtualNetworkRule definition. + */ + interface Blank extends WithAccount { + } + + /** + * The stage of the virtualnetworkrule definition allowing to specify Account. + */ + interface WithAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the Azure resource group + * @param accountName The name of the Data Lake Store account + * @return the next definition stage + */ + WithSubnetId withExistingAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the virtualnetworkrule definition allowing to specify SubnetId. + */ + interface WithSubnetId { + /** + * Specifies subnetId. + * @param subnetId The resource identifier for the subnet + * @return the next definition stage + */ + WithCreate withSubnetId(String subnetId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a VirtualNetworkRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithSubnetId { + } + + /** + * Grouping of VirtualNetworkRule update stages. + */ + interface UpdateStages { + /** + * The stage of the virtualnetworkrule update allowing to specify SubnetId. + */ + interface WithSubnetId { + /** + * Specifies subnetId. + * @param subnetId The resource identifier for the subnet + * @return the next update stage + */ + Update withSubnetId(String subnetId); + } + + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRules.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRules.java new file mode 100644 index 0000000000000..d7c524f30c37a --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/VirtualNetworkRules.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.management.datalakestore.v2016_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.VirtualNetworkRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing VirtualNetworkRules. + */ +public interface VirtualNetworkRules extends SupportsCreating, HasInner { + /** + * Gets the specified Data Lake Store virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName); + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified virtual network rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName); + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsImpl.java new file mode 100644 index 0000000000000..974ff93062d1a --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsImpl.java @@ -0,0 +1,209 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.Accounts; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccount; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.arm.utils.PagedListConverter; +import com.microsoft.azure.management.datalakestore.v2016_11_01.NameAvailabilityInformation; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CheckNameAvailabilityParameters; + +class AccountsImpl extends GroupableResourcesCoreImpl implements Accounts { + protected AccountsImpl(DataLakeStoreManager manager) { + super(manager.inner().accounts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + AccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + AccountsInner client = this.inner(); + PagedListConverter converter = + new PagedListConverter() { + @Override + public Observable typeConvertAsync(DataLakeStoreAccountBasicInner inner) { + return Observable.just(inner) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeStoreAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccount call(DataLakeStoreAccountInner inner) { + return wrapModel(inner); + } + }); + } + }; + return converter.convert(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AccountsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeStoreAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccount call(DataLakeStoreAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + AccountsInner client = this.inner(); + PagedListConverter converter = + new PagedListConverter() { + @Override + public Observable typeConvertAsync(DataLakeStoreAccountBasicInner inner) { + return Observable.just(inner) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeStoreAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccount call(DataLakeStoreAccountInner inner) { + return wrapModel(inner); + } + }); + } + }; + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + AccountsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .flatMap(new Func1>() { + @Override + public Observable call(DataLakeStoreAccountBasicInner inner) { + return getInnerAsync(ResourceUtilsCore.groupFromResourceId(inner.id()), ResourceUtilsCore.nameFromResourceId(inner.id())); + } + }) + .map(new Func1() { + @Override + public DataLakeStoreAccount call(DataLakeStoreAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DataLakeStoreAccountImpl define(String name) { + return wrapModel(name); + } + + @Override + public Completable enableKeyVaultAsync(String resourceGroupName, String accountName) { + AccountsInner client = this.inner(); + return client.enableKeyVaultAsync(resourceGroupName, accountName).toCompletable(); + } + + @Override + protected DataLakeStoreAccountImpl wrapModel(DataLakeStoreAccountInner inner) { + return new DataLakeStoreAccountImpl(inner.name(), inner, manager()); + } + + @Override + protected DataLakeStoreAccountImpl wrapModel(String name) { + return new DataLakeStoreAccountImpl(name, new DataLakeStoreAccountInner(), this.manager()); + } + + @Override + public Observable checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters) { + AccountsInner client = this.inner(); + return client.checkNameAvailabilityAsync(location, parameters) + .map(new Func1() { + @Override + public NameAvailabilityInformation call(NameAvailabilityInformationInner inner) { + return new NameAvailabilityInformationImpl(inner, manager()); + } + }); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java new file mode 100644 index 0000000000000..3df5ba9bdb238 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java @@ -0,0 +1,1608 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CheckNameAvailabilityParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateDataLakeStoreAccountParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateDataLakeStoreAccountParameters; +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.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 Accounts. + */ +public class AccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private AccountsService service; + /** The service client containing this operation class. */ + private DataLakeStoreAccountManagementClientImpl client; + + /** + * Initializes an instance of AccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AccountsInner(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { + this.service = retrofit.create(AccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Accounts to be + * used by Retrofit to perform actually REST calls. + */ + interface AccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2016_11_01.Accounts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}") + Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body CreateDataLakeStoreAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}") + Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body CreateDataLakeStoreAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body UpdateDataLakeStoreAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Body UpdateDataLakeStoreAccountParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts enableKeyVault" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/enableKeyVault") + Observable> enableKeyVault(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Body CheckNameAvailabilityParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.Accounts listNext" }) + @GET + Observable> listNext(@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.management.datalakestore.v2016_11_01.Accounts listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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<DataLakeStoreAccountBasicInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountBasicInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountBasicInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeStoreAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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 select = null; + final String orderby = null; + final Boolean count = null; + return service.list(this.client.subscriptionId(), filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), 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 Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 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<DataLakeStoreAccountBasicInner> object if successful. + */ + public PagedList list(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listSinglePageAsync(filter, top, skip, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 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> listAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter, top, skip, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 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<DataLakeStoreAccountBasicInner> object + */ + public Observable> listAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listWithServiceResponseAsync(filter, top, skip, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + * @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 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<DataLakeStoreAccountBasicInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listSinglePageAsync(filter, top, skip, 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(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. + * + 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 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<DataLakeStoreAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), 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 Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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<DataLakeStoreAccountBasicInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountBasicInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataLakeStoreAccountBasicInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataLakeStoreAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName 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 select = null; + final String orderby = null; + final Boolean count = null; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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 A 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<DataLakeStoreAccountBasicInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, select, orderby, count).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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 A 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> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, select, orderby, count), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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 A 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<DataLakeStoreAccountBasicInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, top, skip, select, orderby, count) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + * @param resourceGroupName The name of the Azure resource group. + * @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 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 A 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<DataLakeStoreAccountBasicInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + return listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, skip, 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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + 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 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 A 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<DataLakeStoreAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, filter, top, skip, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(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); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner create(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + Observable> observable = service.create(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner beginCreate(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @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 beginCreateAsync(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + return service.beginCreate(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(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); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner update(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 updateAsync(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 DataLakeStoreAccountInner object if successful. + */ + public DataLakeStoreAccountInner beginUpdate(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @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 beginUpdateAsync(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, DataLakeStoreAccountInner>() { + @Override + public DataLakeStoreAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified Data Lake Store account information. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataLakeStoreAccountInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName 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); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, accountName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 delete(String resourceGroupName, String accountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 beginDelete(String resourceGroupName, String accountName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 beginDeleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 enableKeyVault(String resourceGroupName, String accountName) { + enableKeyVaultWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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 enableKeyVaultAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(enableKeyVaultWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable enableKeyVaultAsync(String resourceGroupName, String accountName) { + return enableKeyVaultWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> enableKeyVaultWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.enableKeyVault(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = enableKeyVaultDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse enableKeyVaultDelegate(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); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @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 NameAvailabilityInformationInner object if successful. + */ + public NameAvailabilityInformationInner checkNameAvailability(String location, CheckNameAvailabilityParameters parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @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 checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInformationInner object + */ + public Observable checkNameAvailabilityAsync(String location, CheckNameAvailabilityParameters parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).map(new Func1, NameAvailabilityInformationInner>() { + @Override + public NameAvailabilityInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInformationInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, CheckNameAvailabilityParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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); + return service.checkNameAvailability(this.client.subscriptionId(), location, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountBasicInner> 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 Data Lake Store accounts within the subscription. 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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountBasicInner> 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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountBasicInner> 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 Data Lake Store accounts within the subscription. 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<DataLakeStoreAccountBasicInner> 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); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountBasicInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountBasicInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountBasicInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. 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<DataLakeStoreAccountBasicInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(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/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationImpl.java new file mode 100644 index 0000000000000..2b6461ac422d4 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationImpl.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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.CapabilityInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.SubscriptionState; +import java.util.UUID; + +class CapabilityInformationImpl extends WrapperImpl implements CapabilityInformation { + private final DataLakeStoreManager manager; + CapabilityInformationImpl(CapabilityInformationInner inner, DataLakeStoreManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public Integer accountCount() { + return this.inner().accountCount(); + } + + @Override + public Integer maxAccountCount() { + return this.inner().maxAccountCount(); + } + + @Override + public Boolean migrationState() { + return this.inner().migrationState(); + } + + @Override + public SubscriptionState state() { + return this.inner().state(); + } + + @Override + public UUID subscriptionId() { + return this.inner().subscriptionId(); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationInner.java new file mode 100644 index 0000000000000..5db49e942813d --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/CapabilityInformationInner.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.management.datalakestore.v2016_11_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.datalakestore.v2016_11_01.SubscriptionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subscription-level properties and limits for Data Lake Store. + */ +public class CapabilityInformationInner { + /** + * The subscription credentials that uniquely identifies the subscription. + */ + @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private UUID subscriptionId; + + /** + * The subscription state. Possible values include: 'Registered', + * 'Suspended', 'Deleted', 'Unregistered', 'Warned'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private SubscriptionState state; + + /** + * The maximum supported number of accounts under this subscription. + */ + @JsonProperty(value = "maxAccountCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxAccountCount; + + /** + * The current number of accounts under this subscription. + */ + @JsonProperty(value = "accountCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer accountCount; + + /** + * The Boolean value of true or false to indicate the maintenance state. + */ + @JsonProperty(value = "migrationState", access = JsonProperty.Access.WRITE_ONLY) + private Boolean migrationState; + + /** + * Get the subscription credentials that uniquely identifies the subscription. + * + * @return the subscriptionId value + */ + public UUID subscriptionId() { + return this.subscriptionId; + } + + /** + * Get the subscription state. Possible values include: 'Registered', 'Suspended', 'Deleted', 'Unregistered', 'Warned'. + * + * @return the state value + */ + public SubscriptionState state() { + return this.state; + } + + /** + * Get the maximum supported number of accounts under this subscription. + * + * @return the maxAccountCount value + */ + public Integer maxAccountCount() { + return this.maxAccountCount; + } + + /** + * Get the current number of accounts under this subscription. + * + * @return the accountCount value + */ + public Integer accountCount() { + return this.accountCount; + } + + /** + * Get the Boolean value of true or false to indicate the maintenance state. + * + * @return the migrationState value + */ + public Boolean migrationState() { + return this.migrationState; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountBasicInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountBasicInner.java new file mode 100644 index 0000000000000..aef0650a8fa87 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountBasicInner.java @@ -0,0 +1,120 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccountStatus; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccountState; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Basic Data Lake Store account information, returned on list calls. + */ +@JsonFlatten +@SkipParentValidation +public class DataLakeStoreAccountBasicInner extends Resource { + /** + * The unique identifier associated with this Data Lake Store account. + */ + @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) + private UUID accountId; + + /** + * The provisioning status of the Data Lake Store account. Possible values + * include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', + * 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', + * 'Canceled'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountStatus provisioningState; + + /** + * The state of the Data Lake Store account. Possible values include: + * 'Active', 'Suspended'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountState state; + + /** + * The account creation time. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * The account last modified time. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The full CName endpoint for this account. + */ + @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /** + * Get the unique identifier associated with this Data Lake Store account. + * + * @return the accountId value + */ + public UUID accountId() { + return this.accountId; + } + + /** + * Get the provisioning status of the Data Lake Store account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled'. + * + * @return the provisioningState value + */ + public DataLakeStoreAccountStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the state of the Data Lake Store account. Possible values include: 'Active', 'Suspended'. + * + * @return the state value + */ + public DataLakeStoreAccountState state() { + return this.state; + } + + /** + * Get the account creation time. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get the account last modified time. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the full CName endpoint for this account. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountImpl.java new file mode 100644 index 0000000000000..b8693598d607b --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountImpl.java @@ -0,0 +1,320 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccount; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateDataLakeStoreAccountParameters; +import java.util.List; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateDataLakeStoreAccountParameters; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TierType; +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionConfig; +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionProvisioningState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallAllowAzureIpsState; +import java.util.ArrayList; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallRule; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionIdentity; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccountStatus; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccountState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProvider; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProviderState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.VirtualNetworkRule; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateFirewallRuleWithAccountParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateTrustedIdProviderWithAccountParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateVirtualNetworkRuleWithAccountParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateEncryptionConfig; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateFirewallRuleWithAccountParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateTrustedIdProviderWithAccountParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateVirtualNetworkRuleWithAccountParameters; +import rx.functions.Func1; + +class DataLakeStoreAccountImpl extends GroupableResourceCoreImpl implements DataLakeStoreAccount, DataLakeStoreAccount.Definition, DataLakeStoreAccount.Update { + private CreateDataLakeStoreAccountParameters createParameter; + private UpdateDataLakeStoreAccountParameters updateParameter; + DataLakeStoreAccountImpl(String name, DataLakeStoreAccountInner inner, DataLakeStoreManager manager) { + super(name, inner, manager); + this.createParameter = new CreateDataLakeStoreAccountParameters(); + this.updateParameter = new UpdateDataLakeStoreAccountParameters(); + } + + @Override + public Observable createResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + this.createParameter.withLocation(inner().location()); + this.createParameter.withTags(inner().getTags()); + return client.createAsync(this.resourceGroupName(), this.name(), this.createParameter) + .map(new Func1() { + @Override + public DataLakeStoreAccountInner call(DataLakeStoreAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public DataLakeStoreAccountInner call(DataLakeStoreAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AccountsInner client = this.manager().inner().accounts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new CreateDataLakeStoreAccountParameters(); + this.updateParameter = new UpdateDataLakeStoreAccountParameters(); + } + + @Override + public UUID accountId() { + return this.inner().accountId(); + } + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public TierType currentTier() { + return this.inner().currentTier(); + } + + @Override + public String defaultGroup() { + return this.inner().defaultGroup(); + } + + @Override + public EncryptionConfig encryptionConfig() { + return this.inner().encryptionConfig(); + } + + @Override + public EncryptionProvisioningState encryptionProvisioningState() { + return this.inner().encryptionProvisioningState(); + } + + @Override + public EncryptionState encryptionState() { + return this.inner().encryptionState(); + } + + @Override + public String endpoint() { + return this.inner().endpoint(); + } + + @Override + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.inner().firewallAllowAzureIps(); + } + + @Override + public List firewallRules() { + List lst = new ArrayList(); + if (this.inner().firewallRules() != null) { + for (FirewallRuleInner inner : this.inner().firewallRules()) { + lst.add( new FirewallRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public FirewallState firewallState() { + return this.inner().firewallState(); + } + + @Override + public EncryptionIdentity identity() { + return this.inner().identity(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public TierType newTier() { + return this.inner().newTier(); + } + + @Override + public DataLakeStoreAccountStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public DataLakeStoreAccountState state() { + return this.inner().state(); + } + + @Override + public List trustedIdProviders() { + List lst = new ArrayList(); + if (this.inner().trustedIdProviders() != null) { + for (TrustedIdProviderInner inner : this.inner().trustedIdProviders()) { + lst.add( new TrustedIdProviderImpl(inner, manager())); + } + } + return lst; + } + + @Override + public TrustedIdProviderState trustedIdProviderState() { + return this.inner().trustedIdProviderState(); + } + + @Override + public List virtualNetworkRules() { + List lst = new ArrayList(); + if (this.inner().virtualNetworkRules() != null) { + for (VirtualNetworkRuleInner inner : this.inner().virtualNetworkRules()) { + lst.add( new VirtualNetworkRuleImpl(inner, manager())); + } + } + return lst; + } + + @Override + public DataLakeStoreAccountImpl withEncryptionConfig(EncryptionConfig encryptionConfig) { + this.createParameter.withEncryptionConfig(encryptionConfig); + return this; + } + + @Override + public DataLakeStoreAccountImpl withEncryptionState(EncryptionState encryptionState) { + this.createParameter.withEncryptionState(encryptionState); + return this; + } + + @Override + public DataLakeStoreAccountImpl withFirewallRulesForCreate(List firewallRules) { + this.createParameter.withFirewallRules(firewallRules); + return this; + } + + @Override + public DataLakeStoreAccountImpl withIdentity(EncryptionIdentity identity) { + this.createParameter.withIdentity(identity); + return this; + } + + @Override + public DataLakeStoreAccountImpl withTrustedIdProvidersForCreate(List trustedIdProviders) { + this.createParameter.withTrustedIdProviders(trustedIdProviders); + return this; + } + + @Override + public DataLakeStoreAccountImpl withVirtualNetworkRulesForCreate(List virtualNetworkRules) { + this.createParameter.withVirtualNetworkRules(virtualNetworkRules); + return this; + } + + @Override + public DataLakeStoreAccountImpl withEncryptionConfig(UpdateEncryptionConfig encryptionConfig) { + this.updateParameter.withEncryptionConfig(encryptionConfig); + return this; + } + + @Override + public DataLakeStoreAccountImpl withFirewallRulesForUpdate(List firewallRules) { + this.updateParameter.withFirewallRules(firewallRules); + return this; + } + + @Override + public DataLakeStoreAccountImpl withTrustedIdProvidersForUpdate(List trustedIdProviders) { + this.updateParameter.withTrustedIdProviders(trustedIdProviders); + return this; + } + + @Override + public DataLakeStoreAccountImpl withVirtualNetworkRulesForUpdate(List virtualNetworkRules) { + this.updateParameter.withVirtualNetworkRules(virtualNetworkRules); + return this; + } + + @Override + public DataLakeStoreAccountImpl withDefaultGroup(String defaultGroup) { + if (isInCreateMode()) { + this.createParameter.withDefaultGroup(defaultGroup); + } else { + this.updateParameter.withDefaultGroup(defaultGroup); + } + return this; + } + + @Override + public DataLakeStoreAccountImpl withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps) { + if (isInCreateMode()) { + this.createParameter.withFirewallAllowAzureIps(firewallAllowAzureIps); + } else { + this.updateParameter.withFirewallAllowAzureIps(firewallAllowAzureIps); + } + return this; + } + + @Override + public DataLakeStoreAccountImpl withFirewallState(FirewallState firewallState) { + if (isInCreateMode()) { + this.createParameter.withFirewallState(firewallState); + } else { + this.updateParameter.withFirewallState(firewallState); + } + return this; + } + + @Override + public DataLakeStoreAccountImpl withNewTier(TierType newTier) { + if (isInCreateMode()) { + this.createParameter.withNewTier(newTier); + } else { + this.updateParameter.withNewTier(newTier); + } + return this; + } + + @Override + public DataLakeStoreAccountImpl withTrustedIdProviderState(TrustedIdProviderState trustedIdProviderState) { + if (isInCreateMode()) { + this.createParameter.withTrustedIdProviderState(trustedIdProviderState); + } else { + this.updateParameter.withTrustedIdProviderState(trustedIdProviderState); + } + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountInner.java new file mode 100644 index 0000000000000..c90d7ac4f60ae --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountInner.java @@ -0,0 +1,338 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionIdentity; +import java.util.UUID; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccountStatus; +import com.microsoft.azure.management.datalakestore.v2016_11_01.DataLakeStoreAccountState; +import org.joda.time.DateTime; +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionConfig; +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.EncryptionProvisioningState; +import java.util.List; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallAllowAzureIpsState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProviderState; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TierType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Data Lake Store account information. + */ +@JsonFlatten +@SkipParentValidation +public class DataLakeStoreAccountInner extends Resource { + /** + * The Key Vault encryption identity, if any. + */ + @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionIdentity identity; + + /** + * The unique identifier associated with this Data Lake Store account. + */ + @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) + private UUID accountId; + + /** + * The provisioning status of the Data Lake Store account. Possible values + * include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', + * 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', + * 'Canceled'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountStatus provisioningState; + + /** + * The state of the Data Lake Store account. Possible values include: + * 'Active', 'Suspended'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountState state; + + /** + * The account creation time. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * The account last modified time. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The full CName endpoint for this account. + */ + @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /** + * The default owner group for all new folders and files created in the + * Data Lake Store account. + */ + @JsonProperty(value = "properties.defaultGroup", access = JsonProperty.Access.WRITE_ONLY) + private String defaultGroup; + + /** + * The Key Vault encryption configuration. + */ + @JsonProperty(value = "properties.encryptionConfig", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionConfig encryptionConfig; + + /** + * The current state of encryption for this Data Lake Store account. + * Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.encryptionState", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionState encryptionState; + + /** + * The current state of encryption provisioning for this Data Lake Store + * account. Possible values include: 'Creating', 'Succeeded'. + */ + @JsonProperty(value = "properties.encryptionProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + private EncryptionProvisioningState encryptionProvisioningState; + + /** + * The list of firewall rules associated with this Data Lake Store account. + */ + @JsonProperty(value = "properties.firewallRules", access = JsonProperty.Access.WRITE_ONLY) + private List firewallRules; + + /** + * The list of virtual network rules associated with this Data Lake Store + * account. + */ + @JsonProperty(value = "properties.virtualNetworkRules", access = JsonProperty.Access.WRITE_ONLY) + private List virtualNetworkRules; + + /** + * The current state of the IP address firewall for this Data Lake Store + * account. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallState", access = JsonProperty.Access.WRITE_ONLY) + private FirewallState firewallState; + + /** + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.firewallAllowAzureIps", access = JsonProperty.Access.WRITE_ONLY) + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /** + * The list of trusted identity providers associated with this Data Lake + * Store account. + */ + @JsonProperty(value = "properties.trustedIdProviders", access = JsonProperty.Access.WRITE_ONLY) + private List trustedIdProviders; + + /** + * The current state of the trusted identity provider feature for this Data + * Lake Store account. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.trustedIdProviderState", access = JsonProperty.Access.WRITE_ONLY) + private TrustedIdProviderState trustedIdProviderState; + + /** + * The commitment tier to use for next month. Possible values include: + * 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', + * 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + */ + @JsonProperty(value = "properties.newTier", access = JsonProperty.Access.WRITE_ONLY) + private TierType newTier; + + /** + * The commitment tier in use for the current month. Possible values + * include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', + * 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', + * 'Commitment_5PB'. + */ + @JsonProperty(value = "properties.currentTier", access = JsonProperty.Access.WRITE_ONLY) + private TierType currentTier; + + /** + * Get the Key Vault encryption identity, if any. + * + * @return the identity value + */ + public EncryptionIdentity identity() { + return this.identity; + } + + /** + * Get the unique identifier associated with this Data Lake Store account. + * + * @return the accountId value + */ + public UUID accountId() { + return this.accountId; + } + + /** + * Get the provisioning status of the Data Lake Store account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled'. + * + * @return the provisioningState value + */ + public DataLakeStoreAccountStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the state of the Data Lake Store account. Possible values include: 'Active', 'Suspended'. + * + * @return the state value + */ + public DataLakeStoreAccountState state() { + return this.state; + } + + /** + * Get the account creation time. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get the account last modified time. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the full CName endpoint for this account. + * + * @return the endpoint value + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Get the default owner group for all new folders and files created in the Data Lake Store account. + * + * @return the defaultGroup value + */ + public String defaultGroup() { + return this.defaultGroup; + } + + /** + * Get the Key Vault encryption configuration. + * + * @return the encryptionConfig value + */ + public EncryptionConfig encryptionConfig() { + return this.encryptionConfig; + } + + /** + * Get the current state of encryption for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the encryptionState value + */ + public EncryptionState encryptionState() { + return this.encryptionState; + } + + /** + * Get the current state of encryption provisioning for this Data Lake Store account. Possible values include: 'Creating', 'Succeeded'. + * + * @return the encryptionProvisioningState value + */ + public EncryptionProvisioningState encryptionProvisioningState() { + return this.encryptionProvisioningState; + } + + /** + * Get the list of firewall rules associated with this Data Lake Store account. + * + * @return the firewallRules value + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Get the list of virtual network rules associated with this Data Lake Store account. + * + * @return the virtualNetworkRules value + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Get the current state of the IP address firewall for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallState value + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Get the current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'. + * + * @return the firewallAllowAzureIps value + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Get the list of trusted identity providers associated with this Data Lake Store account. + * + * @return the trustedIdProviders value + */ + public List trustedIdProviders() { + return this.trustedIdProviders; + } + + /** + * Get the current state of the trusted identity provider feature for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled'. + * + * @return the trustedIdProviderState value + */ + public TrustedIdProviderState trustedIdProviderState() { + return this.trustedIdProviderState; + } + + /** + * Get the commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + * + * @return the newTier value + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Get the commitment tier in use for the current month. Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB'. + * + * @return the currentTier value + */ + public TierType currentTier() { + return this.currentTier; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountManagementClientImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountManagementClientImpl.java new file mode 100644 index 0000000000000..edaaf7717c790 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreAccountManagementClientImpl.java @@ -0,0 +1,266 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataLakeStoreAccountManagementClientImpl class. + */ +public class DataLakeStoreAccountManagementClientImpl extends AzureServiceClient { + /** 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; + } + + /** Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataLakeStoreAccountManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataLakeStoreAccountManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * 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 DataLakeStoreAccountManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 DataLakeStoreAccountManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The AccountsInner object to access its operations. + */ + private AccountsInner accounts; + + /** + * Gets the AccountsInner object to access its operations. + * @return the AccountsInner object. + */ + public AccountsInner accounts() { + return this.accounts; + } + + /** + * The FirewallRulesInner object to access its operations. + */ + private FirewallRulesInner firewallRules; + + /** + * Gets the FirewallRulesInner object to access its operations. + * @return the FirewallRulesInner object. + */ + public FirewallRulesInner firewallRules() { + return this.firewallRules; + } + + /** + * The VirtualNetworkRulesInner object to access its operations. + */ + private VirtualNetworkRulesInner virtualNetworkRules; + + /** + * Gets the VirtualNetworkRulesInner object to access its operations. + * @return the VirtualNetworkRulesInner object. + */ + public VirtualNetworkRulesInner virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * The TrustedIdProvidersInner object to access its operations. + */ + private TrustedIdProvidersInner trustedIdProviders; + + /** + * Gets the TrustedIdProvidersInner object to access its operations. + * @return the TrustedIdProvidersInner object. + */ + public TrustedIdProvidersInner trustedIdProviders() { + return this.trustedIdProviders; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The LocationsInner object to access its operations. + */ + private LocationsInner locations; + + /** + * Gets the LocationsInner object to access its operations. + * @return the LocationsInner object. + */ + public LocationsInner locations() { + return this.locations; + } + + /** + * Initializes an instance of DataLakeStoreAccountManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public DataLakeStoreAccountManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataLakeStoreAccountManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataLakeStoreAccountManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataLakeStoreAccountManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataLakeStoreAccountManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2016-11-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.accounts = new AccountsInner(restClient().retrofit(), this); + this.firewallRules = new FirewallRulesInner(restClient().retrofit(), this); + this.virtualNetworkRules = new VirtualNetworkRulesInner(restClient().retrofit(), this); + this.trustedIdProviders = new TrustedIdProvidersInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.locations = new LocationsInner(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, auto-generated)", super.userAgent(), "DataLakeStoreAccountManagementClient", "2016-11-01"); + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreManager.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreManager.java new file mode 100644 index 0000000000000..1d0479be7af67 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/DataLakeStoreManager.java @@ -0,0 +1,159 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.datalakestore.v2016_11_01.Accounts; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallRules; +import com.microsoft.azure.management.datalakestore.v2016_11_01.VirtualNetworkRules; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProviders; +import com.microsoft.azure.management.datalakestore.v2016_11_01.Operations; +import com.microsoft.azure.management.datalakestore.v2016_11_01.Locations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataLakeStore resource management. + */ +public final class DataLakeStoreManager extends ManagerCore { + private Accounts accounts; + private FirewallRules firewallRules; + private VirtualNetworkRules virtualNetworkRules; + private TrustedIdProviders trustedIdProviders; + private Operations operations; + private Locations locations; + /** + * Get a Configurable instance that can be used to create DataLakeStoreManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataLakeStoreManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataLakeStoreManager that exposes DataLakeStore resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataLakeStoreManager + */ + public static DataLakeStoreManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataLakeStoreManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataLakeStoreManager that exposes DataLakeStore resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataLakeStoreManager + */ + public static DataLakeStoreManager authenticate(RestClient restClient, String subscriptionId) { + return new DataLakeStoreManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataLakeStoreManager that exposes DataLakeStore management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataLakeStore management API entry points that work across subscriptions + */ + DataLakeStoreManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Accounts. + */ + public Accounts accounts() { + if (this.accounts == null) { + this.accounts = new AccountsImpl(this); + } + return this.accounts; + } + + /** + * @return Entry point to manage FirewallRules. + */ + public FirewallRules firewallRules() { + if (this.firewallRules == null) { + this.firewallRules = new FirewallRulesImpl(this); + } + return this.firewallRules; + } + + /** + * @return Entry point to manage VirtualNetworkRules. + */ + public VirtualNetworkRules virtualNetworkRules() { + if (this.virtualNetworkRules == null) { + this.virtualNetworkRules = new VirtualNetworkRulesImpl(this); + } + return this.virtualNetworkRules; + } + + /** + * @return Entry point to manage TrustedIdProviders. + */ + public TrustedIdProviders trustedIdProviders() { + if (this.trustedIdProviders == null) { + this.trustedIdProviders = new TrustedIdProvidersImpl(this); + } + return this.trustedIdProviders; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Locations. + */ + public Locations locations() { + if (this.locations == null) { + this.locations = new LocationsImpl(this); + } + return this.locations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataLakeStoreManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataLakeStoreManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataLakeStoreManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataLakeStoreAccountManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleImpl.java new file mode 100644 index 0000000000000..991d4dade49d5 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleImpl.java @@ -0,0 +1,151 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateFirewallRuleParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateOrUpdateFirewallRuleParameters; +import rx.functions.Func1; + +class FirewallRuleImpl extends CreatableUpdatableImpl implements FirewallRule, FirewallRule.Definition, FirewallRule.Update { + private final DataLakeStoreManager manager; + private String resourceGroupName; + private String accountName; + private String firewallRuleName; + private CreateOrUpdateFirewallRuleParameters createParameter; + private UpdateFirewallRuleParameters updateParameter; + + FirewallRuleImpl(String name, DataLakeStoreManager manager) { + super(name, new FirewallRuleInner()); + this.manager = manager; + // Set resource name + this.firewallRuleName = name; + // + this.createParameter = new CreateOrUpdateFirewallRuleParameters(); + this.updateParameter = new UpdateFirewallRuleParameters(); + } + + FirewallRuleImpl(FirewallRuleInner inner, DataLakeStoreManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.firewallRuleName = inner.name(); + // resource ancestor names + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.firewallRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "firewallRules"); + // + this.createParameter = new CreateOrUpdateFirewallRuleParameters(); + this.updateParameter = new UpdateFirewallRuleParameters(); + } + + @Override + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + FirewallRulesInner client = this.manager().inner().firewallRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.firewallRuleName, this.createParameter) + .map(new Func1() { + @Override + public FirewallRuleInner call(FirewallRuleInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + FirewallRulesInner client = this.manager().inner().firewallRules(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.firewallRuleName, this.updateParameter) + .map(new Func1() { + @Override + public FirewallRuleInner call(FirewallRuleInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + FirewallRulesInner client = this.manager().inner().firewallRules(); + return client.getAsync(this.resourceGroupName, this.accountName, this.firewallRuleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new CreateOrUpdateFirewallRuleParameters(); + this.updateParameter = new UpdateFirewallRuleParameters(); + } + + @Override + public String endIpAddress() { + return this.inner().endIpAddress(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String startIpAddress() { + return this.inner().startIpAddress(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FirewallRuleImpl withExistingAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public FirewallRuleImpl withEndIpAddress(String endIpAddress) { + if (isInCreateMode()) { + this.createParameter.withEndIpAddress(endIpAddress); + } else { + this.updateParameter.withEndIpAddress(endIpAddress); + } + return this; + } + + @Override + public FirewallRuleImpl withStartIpAddress(String startIpAddress) { + if (isInCreateMode()) { + this.createParameter.withStartIpAddress(startIpAddress); + } else { + this.updateParameter.withStartIpAddress(startIpAddress); + } + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleInner.java new file mode 100644 index 0000000000000..7377c0653ccb0 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRuleInner.java @@ -0,0 +1,82 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Data Lake Store firewall rule information. + */ +@JsonFlatten +public class FirewallRuleInner extends SubResource { + /** + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.startIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String startIpAddress; + + /** + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "properties.endIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String endIpAddress; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the startIpAddress value + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Get the end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + * + * @return the endIpAddress value + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesImpl.java new file mode 100644 index 0000000000000..e8b368d550cb8 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesImpl.java @@ -0,0 +1,81 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallRules; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallRule; + +class FirewallRulesImpl extends WrapperImpl implements FirewallRules { + private final DataLakeStoreManager manager; + + FirewallRulesImpl(DataLakeStoreManager manager) { + super(manager.inner().firewallRules()); + this.manager = manager; + } + + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public FirewallRuleImpl define(String name) { + return wrapModel(name); + } + + private FirewallRuleImpl wrapModel(FirewallRuleInner inner) { + return new FirewallRuleImpl(inner, manager()); + } + + private FirewallRuleImpl wrapModel(String name) { + return new FirewallRuleImpl(name, this.manager()); + } + + @Override + public Observable listByAccountAsync(final String resourceGroupName, final String accountName) { + FirewallRulesInner client = this.inner(); + return client.listByAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FirewallRule call(FirewallRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String firewallRuleName) { + FirewallRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, firewallRuleName) + .map(new Func1() { + @Override + public FirewallRule call(FirewallRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String firewallRuleName) { + FirewallRulesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, firewallRuleName).toCompletable(); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesInner.java new file mode 100644 index 0000000000000..55dd3da93827f --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/FirewallRulesInner.java @@ -0,0 +1,799 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateOrUpdateFirewallRuleParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateFirewallRuleParameters; +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 FirewallRules. + */ +public class FirewallRulesInner { + /** The Retrofit service to perform REST calls. */ + private FirewallRulesService service; + /** The service client containing this operation class. */ + private DataLakeStoreAccountManagementClientImpl client; + + /** + * Initializes an instance of FirewallRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public FirewallRulesInner(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { + this.service = retrofit.create(FirewallRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for FirewallRules to be + * used by Retrofit to perform actually REST calls. + */ + interface FirewallRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2016_11_01.FirewallRules listByAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules") + Observable> listByAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.FirewallRules createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Body CreateOrUpdateFirewallRuleParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.FirewallRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.FirewallRules update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Body UpdateFirewallRuleParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.FirewallRules delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("firewallRuleName") String firewallRuleName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.FirewallRules listByAccountNext" }) + @GET + Observable> listByAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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<FirewallRuleInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallRuleInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FirewallRuleInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByAccountSinglePageAsync(resourceGroupName, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountDelegate(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); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner createOrUpdate(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @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 createOrUpdateAsync(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName, CreateOrUpdateFirewallRuleParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName 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); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(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 Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule 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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner get(String resourceGroupName, String accountName, String firewallRuleName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule 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 getAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner update(String resourceGroupName, String accountName, String firewallRuleName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @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 updateAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName 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 UpdateFirewallRuleParameters parameters = null; + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @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 FirewallRuleInner object if successful. + */ + public FirewallRuleInner update(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @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 updateAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters), serviceCallback); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName, parameters).map(new Func1, FirewallRuleInner>() { + @Override + public FirewallRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified firewall rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @param parameters Parameters supplied to update the firewall rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FirewallRuleInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName 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); + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(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 firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule 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 delete(String resourceGroupName, String accountName, String firewallRuleName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule 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 deleteAsync(String resourceGroupName, String accountName, String firewallRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName), serviceCallback); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String firewallRuleName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String firewallRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (firewallRuleName == null) { + throw new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, accountName, firewallRuleName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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<FirewallRuleInner> object if successful. + */ + public PagedList listByAccountNext(final String nextPageLink) { + ServiceResponse> response = listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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> listByAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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<FirewallRuleInner> object + */ + public Observable> listByAccountNextAsync(final String nextPageLink) { + return listByAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @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<FirewallRuleInner> object + */ + public Observable>> listByAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByAccountNextSinglePageAsync(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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountNextSinglePageAsync(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.listByAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountNextDelegate(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/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/IdParsingUtils.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..744694bf7936b --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsImpl.java new file mode 100644 index 0000000000000..7aef8cec80817 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsImpl.java @@ -0,0 +1,42 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.Locations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CapabilityInformation; + +class LocationsImpl extends WrapperImpl implements Locations { + private final DataLakeStoreManager manager; + + LocationsImpl(DataLakeStoreManager manager) { + super(manager.inner().locations()); + this.manager = manager; + } + + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public Observable getCapabilityAsync(String location) { + LocationsInner client = this.inner(); + return client.getCapabilityAsync(location) + .map(new Func1() { + @Override + public CapabilityInformation call(CapabilityInformationInner inner) { + return new CapabilityInformationImpl(inner, manager()); + } + }); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsInner.java new file mode 100644 index 0000000000000..48af59f32df3f --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/LocationsInner.java @@ -0,0 +1,140 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Locations. + */ +public class LocationsInner { + /** The Retrofit service to perform REST calls. */ + private LocationsService service; + /** The service client containing this operation class. */ + private DataLakeStoreAccountManagementClientImpl client; + + /** + * Initializes an instance of LocationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LocationsInner(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { + this.service = retrofit.create(LocationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Locations to be + * used by Retrofit to perform actually REST calls. + */ + interface LocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2016_11_01.Locations getCapability" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/capability") + Observable> getCapability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets subscription-level properties and limits for Data Lake Store specified by resource location. + * + * @param location The resource location without whitespace. + * @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 CapabilityInformationInner object if successful. + */ + public CapabilityInformationInner getCapability(String location) { + return getCapabilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Gets subscription-level properties and limits for Data Lake Store specified by resource location. + * + * @param location The resource location without whitespace. + * @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 getCapabilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getCapabilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Gets subscription-level properties and limits for Data Lake Store specified by resource location. + * + * @param location The resource location without whitespace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CapabilityInformationInner object + */ + public Observable getCapabilityAsync(String location) { + return getCapabilityWithServiceResponseAsync(location).map(new Func1, CapabilityInformationInner>() { + @Override + public CapabilityInformationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets subscription-level properties and limits for Data Lake Store specified by resource location. + * + * @param location The resource location without whitespace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CapabilityInformationInner object + */ + public Observable> getCapabilityWithServiceResponseAsync(String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getCapability(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getCapabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getCapabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationImpl.java new file mode 100644 index 0000000000000..14339211b3333 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationImpl.java @@ -0,0 +1,41 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.NameAvailabilityInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class NameAvailabilityInformationImpl extends WrapperImpl implements NameAvailabilityInformation { + private final DataLakeStoreManager manager; + NameAvailabilityInformationImpl(NameAvailabilityInformationInner inner, DataLakeStoreManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public String reason() { + return this.inner().reason(); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationInner.java new file mode 100644 index 0000000000000..89c71640d866e --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/NameAvailabilityInformationInner.java @@ -0,0 +1,65 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Lake Store account name availability result information. + */ +public class NameAvailabilityInformationInner { + /** + * The Boolean value of true or false to indicate whether the Data Lake + * Store account name is available or not. + */ + @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) + private Boolean nameAvailable; + + /** + * The reason why the Data Lake Store account name is not available, if + * nameAvailable is false. + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private String reason; + + /** + * The message describing why the Data Lake Store account name is not + * available, if nameAvailable is false. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the Boolean value of true or false to indicate whether the Data Lake Store account name is available or not. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Get the reason why the Data Lake Store account name is not available, if nameAvailable is false. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Get the message describing why the Data Lake Store account name is not available, if nameAvailable is false. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationInner.java new file mode 100644 index 0000000000000..6af6f436fb9ef --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationInner.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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.OperationDisplay; +import com.microsoft.azure.management.datalakestore.v2016_11_01.OperationOrigin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An available operation for Data Lake Store. + */ +public class OperationInner { + /** + * The name of the operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The display information for the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * The intended executor of the operation. Possible values include: 'user', + * 'system', 'user,system'. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private OperationOrigin origin; + + /** + * Get the name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the display information for the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display information for the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the intended executor of the operation. Possible values include: 'user', 'system', 'user,system'. + * + * @return the origin value + */ + public OperationOrigin origin() { + return this.origin; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultImpl.java new file mode 100644 index 0000000000000..c2326ebbed5f6 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultImpl.java @@ -0,0 +1,37 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.OperationListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class OperationListResultImpl extends WrapperImpl implements OperationListResult { + private final DataLakeStoreManager manager; + OperationListResultImpl(OperationListResultInner inner, DataLakeStoreManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultInner.java new file mode 100644 index 0000000000000..be45eb2007093 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationListResultInner.java @@ -0,0 +1,48 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of available operations for Data Lake Store. + */ +public class OperationListResultInner { + /** + * The results of the list operation. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** + * The link (url) to the next page of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the results of the list operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Get the link (url) to the next page of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..ef31589d0f0a4 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsImpl.java @@ -0,0 +1,42 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.OperationListResult; + +class OperationsImpl extends WrapperImpl implements Operations { + private final DataLakeStoreManager manager; + + OperationsImpl(DataLakeStoreManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .map(new Func1() { + @Override + public OperationListResult call(OperationListResultInner inner) { + return new OperationListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsInner.java new file mode 100644 index 0000000000000..b7c8ae052d452 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/OperationsInner.java @@ -0,0 +1,128 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private DataLakeStoreAccountManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2016_11_01.Operations list" }) + @GET("providers/Microsoft.DataLakeStore/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available Data Lake Store REST API operations. + * + * @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 OperationListResultInner object if successful. + */ + public OperationListResultInner list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all of the available Data Lake Store REST API operations. + * + * @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 ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all of the available Data Lake Store REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationListResultInner object + */ + public Observable listAsync() { + return listWithServiceResponseAsync().map(new Func1, OperationListResultInner>() { + @Override + public OperationListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available Data Lake Store REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationListResultInner object + */ + public Observable> listWithServiceResponseAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(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); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/PageImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/PageImpl.java new file mode 100644 index 0000000000000..b6a5e11d961fb --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/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.management.datalakestore.v2016_11_01.implementation; + +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/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderImpl.java new file mode 100644 index 0000000000000..5564c3efe5d1f --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderImpl.java @@ -0,0 +1,136 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProvider; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateTrustedIdProviderParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateOrUpdateTrustedIdProviderParameters; +import rx.functions.Func1; + +class TrustedIdProviderImpl extends CreatableUpdatableImpl implements TrustedIdProvider, TrustedIdProvider.Definition, TrustedIdProvider.Update { + private final DataLakeStoreManager manager; + private String resourceGroupName; + private String accountName; + private String trustedIdProviderName; + private CreateOrUpdateTrustedIdProviderParameters createParameter; + private UpdateTrustedIdProviderParameters updateParameter; + + TrustedIdProviderImpl(String name, DataLakeStoreManager manager) { + super(name, new TrustedIdProviderInner()); + this.manager = manager; + // Set resource name + this.trustedIdProviderName = name; + // + this.createParameter = new CreateOrUpdateTrustedIdProviderParameters(); + this.updateParameter = new UpdateTrustedIdProviderParameters(); + } + + TrustedIdProviderImpl(TrustedIdProviderInner inner, DataLakeStoreManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.trustedIdProviderName = inner.name(); + // resource ancestor names + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.trustedIdProviderName = IdParsingUtils.getValueFromIdByName(inner.id(), "trustedIdProviders"); + // + this.createParameter = new CreateOrUpdateTrustedIdProviderParameters(); + this.updateParameter = new UpdateTrustedIdProviderParameters(); + } + + @Override + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + TrustedIdProvidersInner client = this.manager().inner().trustedIdProviders(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.trustedIdProviderName, this.createParameter) + .map(new Func1() { + @Override + public TrustedIdProviderInner call(TrustedIdProviderInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + TrustedIdProvidersInner client = this.manager().inner().trustedIdProviders(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.trustedIdProviderName, this.updateParameter) + .map(new Func1() { + @Override + public TrustedIdProviderInner call(TrustedIdProviderInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + TrustedIdProvidersInner client = this.manager().inner().trustedIdProviders(); + return client.getAsync(this.resourceGroupName, this.accountName, this.trustedIdProviderName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new CreateOrUpdateTrustedIdProviderParameters(); + this.updateParameter = new UpdateTrustedIdProviderParameters(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String idProvider() { + return this.inner().idProvider(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public TrustedIdProviderImpl withExistingAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public TrustedIdProviderImpl withIdProvider(String idProvider) { + if (isInCreateMode()) { + this.createParameter.withIdProvider(idProvider); + } else { + this.updateParameter.withIdProvider(idProvider); + } + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderInner.java new file mode 100644 index 0000000000000..ab48ae178102a --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProviderInner.java @@ -0,0 +1,65 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Data Lake Store trusted identity provider information. + */ +@JsonFlatten +public class TrustedIdProviderInner extends SubResource { + /** + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "properties.idProvider", access = JsonProperty.Access.WRITE_ONLY) + private String idProvider; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the URL of this trusted identity provider. + * + * @return the idProvider value + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersImpl.java new file mode 100644 index 0000000000000..d856e9ae42b57 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersImpl.java @@ -0,0 +1,81 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProviders; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProvider; + +class TrustedIdProvidersImpl extends WrapperImpl implements TrustedIdProviders { + private final DataLakeStoreManager manager; + + TrustedIdProvidersImpl(DataLakeStoreManager manager) { + super(manager.inner().trustedIdProviders()); + this.manager = manager; + } + + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public TrustedIdProviderImpl define(String name) { + return wrapModel(name); + } + + private TrustedIdProviderImpl wrapModel(TrustedIdProviderInner inner) { + return new TrustedIdProviderImpl(inner, manager()); + } + + private TrustedIdProviderImpl wrapModel(String name) { + return new TrustedIdProviderImpl(name, this.manager()); + } + + @Override + public Observable listByAccountAsync(final String resourceGroupName, final String accountName) { + TrustedIdProvidersInner client = this.inner(); + return client.listByAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public TrustedIdProvider call(TrustedIdProviderInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + TrustedIdProvidersInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, trustedIdProviderName) + .map(new Func1() { + @Override + public TrustedIdProvider call(TrustedIdProviderInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + TrustedIdProvidersInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, trustedIdProviderName).toCompletable(); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java new file mode 100644 index 0000000000000..ee77f8f9e5403 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java @@ -0,0 +1,799 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateOrUpdateTrustedIdProviderParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateTrustedIdProviderParameters; +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 TrustedIdProviders. + */ +public class TrustedIdProvidersInner { + /** The Retrofit service to perform REST calls. */ + private TrustedIdProvidersService service; + /** The service client containing this operation class. */ + private DataLakeStoreAccountManagementClientImpl client; + + /** + * Initializes an instance of TrustedIdProvidersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TrustedIdProvidersInner(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { + this.service = retrofit.create(TrustedIdProvidersService.class); + this.client = client; + } + + /** + * The interface defining all the services for TrustedIdProviders to be + * used by Retrofit to perform actually REST calls. + */ + interface TrustedIdProvidersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2016_11_01.TrustedIdProviders listByAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders") + Observable> listByAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.TrustedIdProviders createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("trustedIdProviderName") String trustedIdProviderName, @Body CreateOrUpdateTrustedIdProviderParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.TrustedIdProviders get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("trustedIdProviderName") String trustedIdProviderName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.TrustedIdProviders update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("trustedIdProviderName") String trustedIdProviderName, @Body UpdateTrustedIdProviderParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.TrustedIdProviders delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("trustedIdProviderName") String trustedIdProviderName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.TrustedIdProviders listByAccountNext" }) + @GET + Observable> listByAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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<TrustedIdProviderInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TrustedIdProviderInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<TrustedIdProviderInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByAccountSinglePageAsync(resourceGroupName, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TrustedIdProviderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountDelegate(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); + } + + /** + * Creates or updates the specified trusted identity provider. During update, the trusted identity provider with the specified name will be replaced with this new provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to create or replace the trusted identity provider. + * @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 TrustedIdProviderInner object if successful. + */ + public TrustedIdProviderInner createOrUpdate(String resourceGroupName, String accountName, String trustedIdProviderName, CreateOrUpdateTrustedIdProviderParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified trusted identity provider. During update, the trusted identity provider with the specified name will be replaced with this new provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to create or replace the trusted identity provider. + * @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 createOrUpdateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, CreateOrUpdateTrustedIdProviderParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified trusted identity provider. During update, the trusted identity provider with the specified name will be replaced with this new provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to create or replace the trusted identity provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, CreateOrUpdateTrustedIdProviderParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName, parameters).map(new Func1, TrustedIdProviderInner>() { + @Override + public TrustedIdProviderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified trusted identity provider. During update, the trusted identity provider with the specified name will be replaced with this new provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to create or replace the trusted identity provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String trustedIdProviderName, CreateOrUpdateTrustedIdProviderParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (trustedIdProviderName == null) { + throw new IllegalArgumentException("Parameter trustedIdProviderName 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); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, accountName, trustedIdProviderName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(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 Data Lake Store trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider 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 TrustedIdProviderInner object if successful. + */ + public TrustedIdProviderInner get(String resourceGroupName, String accountName, String trustedIdProviderName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider 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 getAsync(String resourceGroupName, String accountName, String trustedIdProviderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName).map(new Func1, TrustedIdProviderInner>() { + @Override + public TrustedIdProviderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (trustedIdProviderName == null) { + throw new IllegalArgumentException("Parameter trustedIdProviderName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, trustedIdProviderName, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @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 TrustedIdProviderInner object if successful. + */ + public TrustedIdProviderInner update(String resourceGroupName, String accountName, String trustedIdProviderName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName).toBlocking().single().body(); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @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 updateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName), serviceCallback); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName).map(new Func1, TrustedIdProviderInner>() { + @Override + public TrustedIdProviderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (trustedIdProviderName == null) { + throw new IllegalArgumentException("Parameter trustedIdProviderName 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 UpdateTrustedIdProviderParameters parameters = null; + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, trustedIdProviderName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to update the trusted identity provider. + * @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 TrustedIdProviderInner object if successful. + */ + public TrustedIdProviderInner update(String resourceGroupName, String accountName, String trustedIdProviderName, UpdateTrustedIdProviderParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to update the trusted identity provider. + * @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 updateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, UpdateTrustedIdProviderParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName, parameters), serviceCallback); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to update the trusted identity provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, UpdateTrustedIdProviderParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName, parameters).map(new Func1, TrustedIdProviderInner>() { + @Override + public TrustedIdProviderInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified trusted identity provider. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. + * @param parameters Parameters supplied to update the trusted identity provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TrustedIdProviderInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String trustedIdProviderName, UpdateTrustedIdProviderParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (trustedIdProviderName == null) { + throw new IllegalArgumentException("Parameter trustedIdProviderName 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); + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, trustedIdProviderName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(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 trusted identity provider from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider 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 delete(String resourceGroupName, String accountName, String trustedIdProviderName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName).toBlocking().single().body(); + } + + /** + * Deletes the specified trusted identity provider from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider 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 deleteAsync(String resourceGroupName, String accountName, String trustedIdProviderName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName), serviceCallback); + } + + /** + * Deletes the specified trusted identity provider from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProviderName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified trusted identity provider from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (trustedIdProviderName == null) { + throw new IllegalArgumentException("Parameter trustedIdProviderName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, accountName, trustedIdProviderName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @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<TrustedIdProviderInner> object if successful. + */ + public PagedList listByAccountNext(final String nextPageLink) { + ServiceResponse> response = listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @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> listByAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @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<TrustedIdProviderInner> object + */ + public Observable> listByAccountNextAsync(final String nextPageLink) { + return listByAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @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<TrustedIdProviderInner> object + */ + public Observable>> listByAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByAccountNextSinglePageAsync(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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<TrustedIdProviderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountNextSinglePageAsync(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.listByAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountNextDelegate(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/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleImpl.java new file mode 100644 index 0000000000000..ad74fb01bae58 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleImpl.java @@ -0,0 +1,136 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.management.datalakestore.v2016_11_01.VirtualNetworkRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateVirtualNetworkRuleParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateOrUpdateVirtualNetworkRuleParameters; +import rx.functions.Func1; + +class VirtualNetworkRuleImpl extends CreatableUpdatableImpl implements VirtualNetworkRule, VirtualNetworkRule.Definition, VirtualNetworkRule.Update { + private final DataLakeStoreManager manager; + private String resourceGroupName; + private String accountName; + private String virtualNetworkRuleName; + private CreateOrUpdateVirtualNetworkRuleParameters createParameter; + private UpdateVirtualNetworkRuleParameters updateParameter; + + VirtualNetworkRuleImpl(String name, DataLakeStoreManager manager) { + super(name, new VirtualNetworkRuleInner()); + this.manager = manager; + // Set resource name + this.virtualNetworkRuleName = name; + // + this.createParameter = new CreateOrUpdateVirtualNetworkRuleParameters(); + this.updateParameter = new UpdateVirtualNetworkRuleParameters(); + } + + VirtualNetworkRuleImpl(VirtualNetworkRuleInner inner, DataLakeStoreManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.virtualNetworkRuleName = inner.name(); + // resource ancestor names + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts"); + this.virtualNetworkRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworkRules"); + // + this.createParameter = new CreateOrUpdateVirtualNetworkRuleParameters(); + this.updateParameter = new UpdateVirtualNetworkRuleParameters(); + } + + @Override + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + VirtualNetworkRulesInner client = this.manager().inner().virtualNetworkRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.virtualNetworkRuleName, this.createParameter) + .map(new Func1() { + @Override + public VirtualNetworkRuleInner call(VirtualNetworkRuleInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + VirtualNetworkRulesInner client = this.manager().inner().virtualNetworkRules(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.virtualNetworkRuleName, this.updateParameter) + .map(new Func1() { + @Override + public VirtualNetworkRuleInner call(VirtualNetworkRuleInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + VirtualNetworkRulesInner client = this.manager().inner().virtualNetworkRules(); + return client.getAsync(this.resourceGroupName, this.accountName, this.virtualNetworkRuleName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new CreateOrUpdateVirtualNetworkRuleParameters(); + this.updateParameter = new UpdateVirtualNetworkRuleParameters(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String subnetId() { + return this.inner().subnetId(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public VirtualNetworkRuleImpl withExistingAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public VirtualNetworkRuleImpl withSubnetId(String subnetId) { + if (isInCreateMode()) { + this.createParameter.withSubnetId(subnetId); + } else { + this.updateParameter.withSubnetId(subnetId); + } + return this; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleInner.java new file mode 100644 index 0000000000000..5ade39fa19934 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRuleInner.java @@ -0,0 +1,65 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Data Lake Store virtual network rule information. + */ +@JsonFlatten +public class VirtualNetworkRuleInner extends SubResource { + /** + * The resource identifier for the subnet. + */ + @JsonProperty(value = "properties.subnetId", access = JsonProperty.Access.WRITE_ONLY) + private String subnetId; + + /** + * The resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the resource identifier for the subnet. + * + * @return the subnetId value + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Get the resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesImpl.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesImpl.java new file mode 100644 index 0000000000000..005dd774e2211 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesImpl.java @@ -0,0 +1,81 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datalakestore.v2016_11_01.VirtualNetworkRules; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datalakestore.v2016_11_01.VirtualNetworkRule; + +class VirtualNetworkRulesImpl extends WrapperImpl implements VirtualNetworkRules { + private final DataLakeStoreManager manager; + + VirtualNetworkRulesImpl(DataLakeStoreManager manager) { + super(manager.inner().virtualNetworkRules()); + this.manager = manager; + } + + public DataLakeStoreManager manager() { + return this.manager; + } + + @Override + public VirtualNetworkRuleImpl define(String name) { + return wrapModel(name); + } + + private VirtualNetworkRuleImpl wrapModel(VirtualNetworkRuleInner inner) { + return new VirtualNetworkRuleImpl(inner, manager()); + } + + private VirtualNetworkRuleImpl wrapModel(String name) { + return new VirtualNetworkRuleImpl(name, this.manager()); + } + + @Override + public Observable listByAccountAsync(final String resourceGroupName, final String accountName) { + VirtualNetworkRulesInner client = this.inner(); + return client.listByAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public VirtualNetworkRule call(VirtualNetworkRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + VirtualNetworkRulesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, virtualNetworkRuleName) + .map(new Func1() { + @Override + public VirtualNetworkRule call(VirtualNetworkRuleInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + VirtualNetworkRulesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, virtualNetworkRuleName).toCompletable(); + } + +} diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesInner.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesInner.java new file mode 100644 index 0000000000000..235c24e2f4514 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesInner.java @@ -0,0 +1,799 @@ +/** + * 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.management.datalakestore.v2016_11_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datalakestore.v2016_11_01.CreateOrUpdateVirtualNetworkRuleParameters; +import com.microsoft.azure.management.datalakestore.v2016_11_01.UpdateVirtualNetworkRuleParameters; +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 VirtualNetworkRules. + */ +public class VirtualNetworkRulesInner { + /** The Retrofit service to perform REST calls. */ + private VirtualNetworkRulesService service; + /** The service client containing this operation class. */ + private DataLakeStoreAccountManagementClientImpl client; + + /** + * Initializes an instance of VirtualNetworkRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VirtualNetworkRulesInner(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { + this.service = retrofit.create(VirtualNetworkRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for VirtualNetworkRules to be + * used by Retrofit to perform actually REST calls. + */ + interface VirtualNetworkRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datalakestore.v2016_11_01.VirtualNetworkRules listByAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules") + Observable> listByAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.VirtualNetworkRules createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Body CreateOrUpdateVirtualNetworkRuleParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.VirtualNetworkRules get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.VirtualNetworkRules update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Body UpdateVirtualNetworkRuleParameters parameters, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.VirtualNetworkRules delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Query("api-version") String apiVersion, @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.management.datalakestore.v2016_11_01.VirtualNetworkRules listByAccountNext" }) + @GET + Observable> listByAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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<VirtualNetworkRuleInner> object if successful. + */ + public PagedList listByAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @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> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkRuleInner> object + */ + public Observable> listByAccountAsync(final String resourceGroupName, final String accountName) { + return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<VirtualNetworkRuleInner> object + */ + public Observable>> listByAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByAccountSinglePageAsync(resourceGroupName, 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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + ServiceResponse> * @param resourceGroupName The name of the Azure resource group. + ServiceResponse> * @param accountName The name of the Data Lake Store account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByAccount(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountDelegate(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); + } + + /** + * Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to create or update. + * @param parameters Parameters supplied to create or update the virtual network rule. + * @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 VirtualNetworkRuleInner object if successful. + */ + public VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String accountName, String virtualNetworkRuleName, CreateOrUpdateVirtualNetworkRuleParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to create or update. + * @param parameters Parameters supplied to create or update the virtual network rule. + * @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 createOrUpdateAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, CreateOrUpdateVirtualNetworkRuleParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters), serviceCallback); + } + + /** + * Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to create or update. + * @param parameters Parameters supplied to create or update the virtual network rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, CreateOrUpdateVirtualNetworkRuleParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters).map(new Func1, VirtualNetworkRuleInner>() { + @Override + public VirtualNetworkRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to create or update. + * @param parameters Parameters supplied to create or update the virtual network rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, CreateOrUpdateVirtualNetworkRuleParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName 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); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, accountName, virtualNetworkRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(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 Data Lake Store virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule 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 VirtualNetworkRuleInner object if successful. + */ + public VirtualNetworkRuleInner get(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName).toBlocking().single().body(); + } + + /** + * Gets the specified Data Lake Store virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule 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 getAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName), serviceCallback); + } + + /** + * Gets the specified Data Lake Store virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName).map(new Func1, VirtualNetworkRuleInner>() { + @Override + public VirtualNetworkRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Data Lake Store virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, virtualNetworkRuleName, this.client.apiVersion(), this.client.acceptLanguage(), 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); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @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 VirtualNetworkRuleInner object if successful. + */ + public VirtualNetworkRuleInner update(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName).toBlocking().single().body(); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @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 updateAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName), serviceCallback); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName).map(new Func1, VirtualNetworkRuleInner>() { + @Override + public VirtualNetworkRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName 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 UpdateVirtualNetworkRuleParameters parameters = null; + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, virtualNetworkRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @param parameters Parameters supplied to update the virtual network rule. + * @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 VirtualNetworkRuleInner object if successful. + */ + public VirtualNetworkRuleInner update(String resourceGroupName, String accountName, String virtualNetworkRuleName, UpdateVirtualNetworkRuleParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters).toBlocking().single().body(); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @param parameters Parameters supplied to update the virtual network rule. + * @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 updateAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, UpdateVirtualNetworkRuleParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters), serviceCallback); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @param parameters Parameters supplied to update the virtual network rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, UpdateVirtualNetworkRuleParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters).map(new Func1, VirtualNetworkRuleInner>() { + @Override + public VirtualNetworkRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the specified virtual network rule. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @param parameters Parameters supplied to update the virtual network rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualNetworkRuleInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, UpdateVirtualNetworkRuleParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName 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); + return service.update(this.client.subscriptionId(), resourceGroupName, accountName, virtualNetworkRuleName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(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 virtual network rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule 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 delete(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName).toBlocking().single().body(); + } + + /** + * Deletes the specified virtual network rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule 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 deleteAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName), serviceCallback); + } + + /** + * Deletes the specified virtual network rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified virtual network rule from the specified Data Lake Store account. + * + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (virtualNetworkRuleName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, accountName, virtualNetworkRuleName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @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<VirtualNetworkRuleInner> object if successful. + */ + public PagedList listByAccountNext(final String nextPageLink) { + ServiceResponse> response = listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @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> listByAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @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<VirtualNetworkRuleInner> object + */ + public Observable> listByAccountNextAsync(final String nextPageLink) { + return listByAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @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<VirtualNetworkRuleInner> object + */ + public Observable>> listByAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByAccountNextSinglePageAsync(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(listByAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByAccountNextSinglePageAsync(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.listByAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByAccountNextDelegate(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/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/package-info.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/package-info.java new file mode 100644 index 0000000000000..2dd1676004fec --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/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 DataLakeStoreAccountManagementClient. + * Creates an Azure Data Lake Store account management client. + */ +package com.microsoft.azure.management.datalakestore.v2016_11_01.implementation; diff --git a/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/package-info.java b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/package-info.java new file mode 100644 index 0000000000000..abbed663ba4a3 --- /dev/null +++ b/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/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 DataLakeStoreAccountManagementClient. + * Creates an Azure Data Lake Store account management client. + */ +package com.microsoft.azure.management.datalakestore.v2016_11_01;